If I decide to place this in my .htaccess file:
IndexIgnore */*
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page_request=$1 [QSA,L]
The site runs fine. I then decided to mv index.php subdir/index.php
, so I change the last line to the following:
RewriteRule ^(.*)$ /subdir/index.php?page_request=$1 [QSA,L]
And all I see is an Apache directory listing. What am I doing wrong? This probably a very simple solution, but my resources haven't turned up anything.
What bothers me is that this should work. It is intuitive and natural to think that all that is needed is to change the file location of index.php
.
Edit
I have tried RewriteBase
, and RewriteCond %{REQUEST_URI} !/subdir/index.php
. Neither has worked.