httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] moving .htaccess rewrite cond to httpd.conf
Date Wed, 05 Oct 2005 13:52:22 GMT
On 10/5/05, Duncan Drury <d.drury@gmail.com> wrote:
> The Rewrite directives need to go within a Directory block within the
> appropriate VirtualHost:
>
> <Directory /foo/bar>
> RewriteEngine on
> RewriteRule   ^(.*)/section$            /new_location/new_file.htm
> </Directory>
>
> As I understand it you have to do this for every VirtualHost, as Rewrite
> directives aren't inherited.  Well, at least RewriteEngine isn't, according
> to the Apache manual.  If someone knows better I'd be keen to hear, as there
> are some rewrite directives it would be useful to apply globaly.

You can also put it outside the <VirtualHost> and use
RewriteEngine On
RewriteOptions Inherit
in each <VirtualHost>

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message