URL Rewriting Not Working. Please Help |
[eluser]FutureKing[/eluser]
Hi, I am developing a small blog like application. This is my first time with php frameworks and first time with Codeigniter. Problem is I am not able to remove index.php from urls. This is my .htaccess file RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] But I get 404 error when I open http://localhost/contman/postnew/ The page works fine if I open http://localhost/index.php/contman/postnew/ It seems that mod_rewrite is enabled in server(my local system server) screenshot is here: http://img518.imageshack.us/my.php?image...hotkn4.png Please help
[eluser]Colin Williams[/eluser]
Unless index.php is located at the root of your server, I would get rid of that leading forward-slash. /index.php/$1 to index.php/$1
[eluser]chrisbratlien[/eluser]
I had the same problem just over a week ago and here's what fixed it for me: Edit application/config/config.php and find this line $config[‘uri_protocol’] = "AUTO"; Experiment with the other settings provided in the comments. The one which worked for me was "REQUEST_URI". |
Welcome Guest, Not a member yet? Register Sign In |