Hi,
I'm having problems inheriting some of the rewrite rules that I created for
a group of web sites.  I have a number of vhosts located under a /www
directory.  For example:
/www/www.vhost1.org/
/www/www.vhost2.org/
/www/www.vhost3.org/
....

I am trying to define a few URL rewrite rules some of which apply to all of
the vhosts and some of which only apply to an individual site.  I started by
putting all of the common rules in the Apache httpd.conf as follows:
<Directory /www>
    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule /foo$ /index.php?page=foo [nocase,redirect,last]
</Directory>

I tested this configuration and the alias worked on all of the vhosts.  I
then tried to put the individual rules in a site's .htaccess file.  For
example, in /www/www.vhost1.org/.htaccess:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^bar$ /index.php?page=bar [nocase]

I then found that this new alias on vhost1 (www.vhost1.org/bar) worked fine
but the rule in httpd.conf (www.vhost1.org/foo) no longer did.  The
.htaccess rule appears to be clobbering the one in httpd.conf for vhost1.
 The "/foo" alias still workesfine for the other vhosts.  I tried using the
"RewriteOptions Inherit" directive in both .htaccess and httpd.conf with the
hope of having the rule from one inherit from the other but to no avail.

Any suggestions would be greatly appreciated.  I'm running Apache 2.2 on
Fedora.

Thanks in advance for your help.

John

Reply via email to