httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miller Thomas <>
Subject Rewriting problem at root of virtual host
Date Thu, 23 May 2002 14:17:25 GMT

the problem I try to solve is: rewrite all urls except a known list to come
from another host


should come from web1 but

	http://web1/z3/... should be rewritten to
(no final list here). 
(Like home directories but without the ~)

I created a virtual host with the rewrite directives shown below. Everything
seems to work fine with one exception:

a call to or returns with d:\index.html instead
of d:\apache\web1\index.html.

This might be related to the FAQ "Why don't some of my URLs get prefixed
with DocumentRoot when using mod_rewrite? " but this FAQ doesn`r contain a
solution how to do handle rules on the top level.

Thanks for your help.


Here`s the http.conf excerpt


   DocumentRoot "D:/apache/web1/"
   ServerName web1
   ProxyPassReverse  /v/ http://web2/v/
   RewriteEngine on

#the next three statements ar ethe problem ones
	RewriteRule ^$ /index.html 
	RewriteRule ^/$ /index.html
	RewriteRule ^/index\.html - [L]

#map z1 to z1/
  	RewriteRule ^/z1$ /z1/ [R]
#leave z1 unchanged
  	RewriteRule ^/z1/(.*) - [L]
#map z2 to z2/  	
 	RewriteRule ^/z2$ /z2/	[R]
#leave z2 unchanged
	RewriteRule ^/z2/(.*) - [L]
#map web1/name to web1/name/
	RewriteRule ^/([^/]*)$  /$1/ [R]
#map web1/* to web2/v/*
#	RewriteRule ^/(.*)  http://web2/v/$1 [P,L]

	RewriteLog rewrite.log
	RewriteLogLevel 9

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message