DirectoryIndex index.php Options -Indexes AllowOverride All Order allow,deny allow from all Deny from all RewriteEngine on RewriteRule submitimages/$ /submitimages/index.php [L] RewriteRule ^$ /submitimages/directory.index.php [L] RewriteRule /$ /submitimages/directory.index.php [L]