Welcome Guest, Not a member yet? Register   Sign In
What are the chars that the url can include?
#2

[eluser]Aken[/eluser]
It probably doesn't have anything to do with the slash. First, your routes are backwards. The most specific ones should be first. Even if your URI matches the second example, it will always hit the first one and stop there. So flip those two around.

Second, your number regex is excluding zero. So if a user ever tries to go to page 10 for example, the route won't match. I would just use (:num) instead, and make sure your controller checks that number.

Third, it sounds like you're using something from the URI in your SQL query. Avoid doing that wherever possible - always make sure to put it in the format you need before using it in a query. If it needs to be a number, typecast it as an integer first.


Messages In This Thread
What are the chars that the url can include? - by El Forum - 08-13-2012, 01:23 PM
What are the chars that the url can include? - by El Forum - 08-13-2012, 05:07 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 03:28 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 05:01 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 05:20 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 08:17 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:18 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:40 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:58 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 10:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB