URI Troubles |
[eluser]stuffradio[/eluser]
For some reason, I get a lot of this message Quote:The URI you submitted has disallowed characters. and sometimes this message Quote:Message: preg_match() [function.preg-match]: Compilation failed: range out of order in character class at offset 19 The url is http://localhost/urls/register htaccess file is Code: Options +FollowSymLinks index page is blank Allowed characters: Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; Routes Code: $route['default_controller'] = "followurl"; What I want is, anytime I don't have any of those controllers in the routes page, it should redirect using the :any route. This is for a short url script I'm doing.
[eluser]xwero[/eluser]
you have a question mark in the last line of your .htaccess
[eluser]stuffradio[/eluser]
That fixed some of the problem (I copied and pasted that htaccess file) The URL that I listed above still has the same problem though. Any thoughts?
[eluser]xwero[/eluser]
your any route is not fetched so $1 will not be undefined. you need to add parenthesis.
[eluser]stuffradio[/eluser]
When I have this line uncommented Code: $route['(:any)'] = 'urls/getpage/$1'; Quote:The URI you submitted has disallowed characters. When it's commented,all the pages except for the short url page works. So do you have any ideas how I can fix this?
[eluser]Mike Ryan[/eluser]
Hi, Change the single quotes to double quotes: Code: $route['(:any)'] = "urls/getpage/$1"; If you use single quotes the variables are not interpolated, so you are requesting a page called $1, instead of the value of the $1 variable.
[eluser]stuffradio[/eluser]
So can anyone give me pointers on htaccess files that would work for all servers and how to setup my routes to work the way I want them to? |
Welcome Guest, Not a member yet? Register Sign In |