I have a codeigniter app and i wanted to remove index.php from the URI. so from the codeigniter wiki i used this script.
It stopped working once i change a config, after this change all my urls only returned home page. No matter what link i used, it only gives me the home page of my site. So i reverted it back to index.php but the server still works the same way. I tried deleting the .htacess file completely then update it with the new one which actually works but even then its working the same way. (all urls redirected to home page) Im totally out of clue, on whats wrong with my script or server.
P.S : when using .htacess i did make $config[“index”] to be blank.
UPDATE
Now i removed everything else from my .htaccess file and i have only this which is the essential part to remove index.php from uri segment
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Even with only these all my urls are taking me only to the home page. I am clueless as of whats happening.
In your app/config/config.php try changing the value of:
$config['uri_protocol'] = 'AUTO';to:
$config['uri_protocol'] = 'REQUEST_URI';If still not working, try the remaining options (PATH_INFO, QUERY_STRING, ORIG_PATH_INFO).