hi, i have a website, lets say: http://www.domain.com/
and im using rewrite module but! i have a subfolder forum.domain.com
and i dont want the htaccess to affect this directory, how to do it?
please, its real urgent
hi, i have a website, lets say: http://www.domain.com/
and im using rewrite module but! i have a subfolder forum.domain.com
and i dont want the htaccess to affect this directory, how to do it?
please, its real urgent
In httpd.conf:
<Directory /relevant/directory>
AllowOverride None
</Directory>
See the documentation.
You could use a RewriteCond to only apply your rule when a particular domain name is used.
RewriteCond %{HTTP_HOST} ^www\.domain\.comt$ [nocase]
RewriteRule foo bar [l]
If your forum.domain.com
points to a subdirectory like you suggested (and your current .htaccess
file is in the directory that contains that subdirectory, or some directory above it), then all you have to do is add a .htaccess
file in the subdirectory with the following:
RewriteEngine Off
And it will disable mod_rewrite
for any requests that point to that directory.
It is probably easiest to precede the RewriteRule with a RewriteCond directive
RewriteCond %{HTTP_HOST} ^www.domain.com$
This way, the RewriteRule is only applied to requests matching the RewriteCond, which required the HTTP host header to match www.domain.com. (assuming Apache 2.2; I'm not sure whether this syntax is different for previous versions).