Our server is configured with multiple domains which reside in subfolders of the
public_html folder. So
domain1.com is located in
domain2.com is located in
/home/user/public_html/domain2.com and so on.
I've placed a .htaccess file in
/home/user/public_html so I can put settings in it that apply to all domains. I've added two things to this .htaccess file. One is a special environment variable which is getting recognized by PHP just fine. The other is a redirect for any folder called
.svn to a file called non-existant. So my .htaccess file looks like this:
RewriteEngine on RewriteRule /\.svn /non-existant SetEnv ENVIRONMENT PRODUCTION
The problem is that the rewrite rule isn't working at all. The environment variable is, so I know this file is being processed by Apache, but the rewrite rule doesn't work. I've tried several other rewrite rules and none of them seem to be working.
Do rewrite rules only work if they are in the document_root?