diff options
Diffstat (limited to 'docs/manual/rewrite/vhosts.xml')
-rw-r--r-- | docs/manual/rewrite/vhosts.xml | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/docs/manual/rewrite/vhosts.xml b/docs/manual/rewrite/vhosts.xml index 8a44a85016..1cea3de087 100644 --- a/docs/manual/rewrite/vhosts.xml +++ b/docs/manual/rewrite/vhosts.xml @@ -74,10 +74,10 @@ mod_rewrite</a> document.</note> <highlight language="config"> RewriteEngine on -RewriteMap lowercase int:tolower +RewriteMap lowercase "int:tolower" -RewriteCond ${lowercase:%{<strong>HTTP_HOST</strong>}} ^www\.<strong>([^.]+)</strong>\.example\.com$ -RewriteRule ^(.*) /home/<strong>%1</strong>/www$1 +RewriteCond "${lowercase:%{<strong>HTTP_HOST</strong>}}" "^www\.<strong>([^.]+)</strong>\.example\.com$" +RewriteRule "^(.*)" "/home/<strong>%1</strong>/www$1" </highlight></dd> <dt>Discussion</dt> @@ -146,19 +146,19 @@ CustomLog logs/access_log vcommon RewriteEngine On # a ServerName derived from a Host: header may be any case at all -RewriteMap lowercase int:tolower +RewriteMap lowercase "int:tolower" ## deal with normal documents first: # allow Alias /icons/ to work - repeat for other aliases -RewriteCond %{REQUEST_URI} !^/icons/ +RewriteCond "%{REQUEST_URI}" "!^/icons/" # allow CGIs to work -RewriteCond %{REQUEST_URI} !^/cgi-bin/ +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" # do the magic -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1 +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1" ## and now deal with CGIs - we have to force a handler -RewriteCond %{REQUEST_URI} ^/cgi-bin/ -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [H=cgi-script] +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1" [H=cgi-script] </highlight> </section> @@ -185,23 +185,23 @@ customer-N.example.com /www/customers/N<br /> <highlight language="config"> RewriteEngine on -RewriteMap lowercase int:tolower +RewriteMap lowercase "int:tolower" # define the map file -RewriteMap vhost txt:/www/conf/vhost.map +RewriteMap vhost "txt:/www/conf/vhost.map" # deal with aliases as above -RewriteCond %{REQUEST_URI} !^/icons/ -RewriteCond %{REQUEST_URI} !^/cgi-bin/ -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ +RewriteCond "%{REQUEST_URI}" "!^/icons/" +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" # this does the file-based remap -RewriteCond ${vhost:%1} ^(/.*)$ -RewriteRule ^/(.*)$ %1/docs/$1 +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/(.*)$" "%1/docs/$1" -RewriteCond %{REQUEST_URI} ^/cgi-bin/ -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ -RewriteCond ${vhost:%1} ^(/.*)$ -RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script] +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/(.*)$" "%1/cgi-bin/$1" [H=cgi-script] </highlight> </section> |