Forum Moderators: phranque
I'm a newbie to mod_rewrite. All I want to do is use mod_rewrite to make all my php scripts referrable without the '.php' extension. So for instance if I put 'http://mydomain.com/index' into my address bar, I would get 'http://mydomain.com/index.php'.
I have been told that this should (in theory) do the trick:
<IfModule mod_rewrite.c>
Options FollowSymlinks
RewriteEngine On
RewriteRule index* index.php [R]
</IfModule>
However, when I use this script, all URLs directed towards my site then give a 403 error (permissions). If I comment out 'RewriteEngine On', it works normally. Can anyone help? No one seems to be able to shed any light on this problem. I've tried it with and without [R].
If I do put 'http://mydomain.com/index', it does indeed redirect to index.php, however it still gives the 403 error.
Cheers
Mark
RewriteCond %{REQUEST_URI} !^index\.php