Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
apache’s mod_rewrite is turned off by default in wamp. Turn it on then try again.
I use this convenient setup
Options +FollowSymLinks
IndexIgnore */*
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php?url_rewrite_on=1&%{QUERY_STRING}
RewriteRule ^$ index.php?url_rewrite_on=1&%{QUERY_STRING}
</IfModule>
so index.php is only hidden when mod_rewrite is enabled or i explicitly type a url with this in it:
url_rewrite_on=1
if you do that and do not want anyone to explicitly try to manipulate hiding your index.php then make url_rewrite_on a random string that is unlikely to be guessed easily and reflect the change in your config.php and .htaccess