From: Joshua Slive Date: Tue, 31 Jul 2007 19:36:41 +0000 (+0000) Subject: Explicitly mention how to do rewriting in a vhost. X-Git-Tag: 2.3.0~1672 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=719b5e239408caee1f4b299fbee37e5e3f236162;p=apache Explicitly mention how to do rewriting in a vhost. PR: 36506 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@561456 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index fe33dc2e5f..06b2aa6048 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -69,6 +69,7 @@ URLs on the fly
top
@@ -108,6 +109,19 @@ SCRIPT_URL=/u/rse/ SCRIPT_URI=http://en1.engelschall.com/u/rse/ +
top
+
+

Rewriting in Virtual Hosts

+ +

By default, mod_rewrite configuration + settings from the main server context are not inherited by + virtual hosts. To make the main server settings apply to virtual + hosts, you must place the following directives in each <VirtualHost> section:

+ +

+ RewriteEngine On
+ RewriteOptions inherit +

top

Practical Solutions

@@ -634,10 +648,10 @@ RewriteRule ^/$ /homepage.std.html [L]

Use this directive to disable the module instead of commenting out all the RewriteRule directives!

-

Note that, by default, rewrite configurations are not - inherited. This means that you need to have a +

Note that rewrite configurations are not + inherited by virtual hosts. This means that you need to have a RewriteEngine on directive for each virtual host - in which you wish to use it.

+ in which you wish to use rewrite rules.

top
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index 35ecd2667f..3b20638b6f 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -95,6 +95,20 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/ +
Rewriting in Virtual Hosts + +

By default, mod_rewrite configuration + settings from the main server context are not inherited by + virtual hosts. To make the main server settings apply to virtual + hosts, you must place the following directives in each VirtualHost section:

+ + + RewriteEngine On
+ RewriteOptions inherit +
+
+
Practical Solutions

For numerous examples of common, and not-so-common, uses for @@ -126,10 +140,10 @@ SCRIPT_URI=http://en1.engelschall.com/u/rse/ commenting out all the RewriteRule directives!

-

Note that, by default, rewrite configurations are not - inherited. This means that you need to have a +

Note that rewrite configurations are not + inherited by virtual hosts. This means that you need to have a RewriteEngine on directive for each virtual host - in which you wish to use it.

+ in which you wish to use rewrite rules.