CodeIgniter Forums

Full Version: URI/Routing//Default Controller/Htaccess Issue (dev. to live problems)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]underskor[/eluser]
For some reason, /controller/method/param always shows my default controller, but if I use /index.php/controller/method/param, it loads the correct controller.

This setup worked as intended 100% locally, but when uploaded to live server this issue was discovered. I'm fairly sure .htaccess is being parsed and mod_rewrite is enabled. Using incorrect syntax in .htaccess throws error 500's which would lead me to think it's being parsed, and mod_rewrite is enabled according to this test.Can't figure out what the difference between the two servers is.

.Htaccess:
Code:
DirectoryIndex index.php

RewriteEngine On

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond $1 !^(index\.php|css)
RewriteRule ^(.*)$ index.php/$1 [L]
Code:
$config['index_page'] = "";

Anyone have any ideas/run into this problem before?

El Forum

[eluser]underskor[/eluser]
The following did the trick.
Code:
//Change
$config['uri_protocol'] = 'AUTO';

//To
$config['uri_protocol'] = 'REQUEST_URI';

Thanks for all your replies! Tongue

El Forum

[eluser]ppardo[/eluser]
I got the same problem, but change uri_protocol didn't work. Has anyone any other ideas?

El Forum

[eluser]Tim Brownlaw[/eluser]
[quote author="underskor" date="1237295502"]The following did the trick.
Code:
//Change
$config['uri_protocol'] = 'AUTO';

//To
$config['uri_protocol'] = 'REQUEST_URI';

Thanks for all your replies! Tongue[/quote]

I've just experienced the same dilemma and the above solved it for me too!

Thanks a ton. I was running out of obvious options! Now back to work!