Welcome Guest, Not a member yet? Register   Sign In
Problem with underscore in routes...
#1

[eluser]louis w[/eluser]
I have the following in my routes config to send all requests to my page controller.

Code:
$route['(.*)']          = "page/$1";

This works fine for most requests. I have notices thou that if i make a request starting with an underscore it will return a 404 page. I can tell the 404 is happening before it makes it to my controller by looking at the logs.

(My page controller has a _remap so all requests are handled by one method)

_ is in the list of permitted_uri_chars.

Are you aware of any issues with underscores in uri?

Does not work: http://localhost/_test
Works: http://localhost/test
#2

[eluser]Seppo[/eluser]
CI assumes all URL that start with "_" as "private functions".
It's explained in the Controllers page, in the User Guide
#3

[eluser]louis w[/eluser]
Blarg. Too bad, thanks.




Theme © iAndrew 2016 - Forum software by © MyBB