Forum Moderators: phranque
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteCond %{REQUEST_URI}!^/anydir/
RewriteRule ^(.*)$ /anydir/$1
Thanks for any help.
If this is the syntax in the file, it is probably the issue:
DirectoryIndex index.htm
If not the you may be getting into trouble with the base defined as / and the path defined with a preceding /
I think this would be more solid:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteCond %{REQUEST_URI} !^/anydir/
RewriteRule ^(.*)$ /anydir/$1 [L]
Hope this helps.
Justin
Hi jdMorgan =)
RewriteEngine on
# Rewrite index.htm OR index.html OR / to /anydir/index.htm
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(index\.html?)?$ /anydir/index.htm [L]
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteCond %{REQUEST_URI}!^/anydir/
RewriteRule ^(.*)$ /anydir/$1 [L]
Hope this helps.
Justin
Oh, and jdMorgan is the master - I'm just a rookie.