tags:

views:

44

answers:

5

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

+2  A: 

In httpd.conf:

<Directory /relevant/directory>
    AllowOverride None
</Directory>

See the documentation.

Artefacto
im using a .htaccess file with no access to httpd.how do i ignore the "RewriteRule.." on a subdomain?
WEBProject
@WEB I don't get it. You want to use a .htaccess file to... ignore the .htaccess files?
Artefacto
yes, i had an htaccess that was interrupting to the forum dir, so i needed to dismiss it
WEBProject
A: 

Set AllowOverride directive in the subdomain virtualhost to None

radius
A: 

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]
Paul Dixon
+1  A: 

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.

Tim Stone
A: 

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).

Confusion