1) I have a Drupal site located at http://example.com
and I have a directory located at http://example.com/foo
, but I also have a Drupal page with an alias of http://example.com/foo
. How can I get the Drupal page to serve? Currently, I get a 403 forbidden page as a result of the Options -Indexes
declaration in Drupal's .htaccess file, but I do not want to remove this as I do not want directories to be browsable.
EDIT: I have solved this with the following rule:
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ http://localhost/s2k/index.php?q=$1 [L,QSA]
2) To make the problem even more difficult, given the same scenario, if I have an index.html
file inside the directory http://example.com/foo/index.html
I always want this to take priority over Drupal's aliased page (which it does at the moment - currently I have modified the .htaccess file so that any directory with an index.html file displays it - DirectoryIndex index.php index.html
).
EDIT:
So now, how can I write a RewriteCond that will look to see whether or not there is an index.html file inside the directory?