Strange URI behavior |
[eluser]gentleJuggernaut[/eluser]
I have just set up CI 1.7. When I go to the base of my site I get the welcome page as expected. http://localhost/ When I try to go to the controller I get a 404 page not found error. http://localhost/welcome/ Now the odd thing is that when I put a ? in front of the controller name it works as I would expect just the controller name to work http://localhost/?welcome/ I am not really clear on how the .htaccess file works, so here is what I am currently using (from the URI page of the CI manual): RewriteEngine on RewriteCond $1 !^(index\.php|public|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] I dug around and found some topics that were similar and they suggested putting a ? at the end of the index.php reference in the .htaccess file, so I have also tried this (with no change in results): RewriteEngine on RewriteCond $1 !^(index\.php|public|images|robots\.txt) RewriteRule ^(.*)$ /index.php?/$1 [L] I have set $config['base_url'] to the base of my site I have set $config['index_page'] = "" I have left $config['uri_protocol'] = "AUTO" I have left $config['enable_query_strings'] = FALSE Any ideas? Thx.
[eluser]bastones[/eluser]
Code: $config[‘uri_protocol’] = “AUTO” Just above this variable you see some comments: Code: /* Try each one, PATH_INFO, QUERY_STRING, REQUEST_URI and ORIG_PATH_INFO and one should work for you .
[eluser]gentleJuggernaut[/eluser]
Thx for the prompt reply. I have tried all of the different approaches with these two URI's: 1) http://localhost/welcome/ 2) http://localhost/?welcome/ None of them work for URI #1 All of them except 'REQUEST_URI' work for URI #2 'REQUEST_URI' gives me the message 'The URI you submitted has disallowed characters.' in the browser window. |
Welcome Guest, Not a member yet? Register Sign In |