• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URI/Routing//Default Controller/Htaccess Issue (dev. to live problems)

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.

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]
$config['index_page'] = "";

Anyone have any ideas/run into this problem before?

The following did the trick.
$config['uri_protocol'] = 'AUTO';

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

Thanks for all your replies! Tongue

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

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

$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!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.