Re: mod_rewrite, mod_proxy, and relative paths
<foo@bar.com> schreef in bericht
news:Xns988AA9382366E212015975@130.81.64.196...
> Is there a way to preserve the SERVER_NAME info from the original
> request, say with SetEnv? Thus far I haven't had much luck with that
> method.
>
> Listen *:10000
> <Virtual Host *:10000>
>
> RewriteEngine On
> RewriteCond %{SERVER_NAME} !10\.0\.255\.1
> RewriteRule .* "http://10.0.255.1/cgi-bin/go.pl?%{SERVER_NAME}%
> {REQUEST_URI}&" [QSA,L]
>
> RewriteCond %{REQUEST_URI} !go\.pl
> RewriteRule ^/cgi-bin/(.*)$ "http://$1" [P]
> </VirtualHost>
>
This might do your tric ...
.... replace %{SERVER_NAME} with %{HTTP_HOST}
HansH
|