I have the following in my .htaccess
file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ _service.php?uri=$1 [NC,L]
</IfModule>
Only problem is there is no rewrite happening and I simply see a directory listing when attempting to access the root page of the server localhost
.
Even when I try to make the match optional RewriteRule ^(.*)?$ _service.php?uri=$1 [NC,L]
it does not work.
The rewrite seems fine for any other case e.g. localhost/foo/bar
How do I get the rewrite to happen for this particular case?