httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Trivial question...
Date Wed, 23 Jan 2002 10:38:34 GMT
mendez@lug.com wrote:
> 
> Yes, that what I thought :
> 
> RewriteRule ^/(.+) http://www.site2.com/$1
> 
> inside the virtual host directive, but unforunately, the URL change !!

Of course. You are specifying an external URL. 

Rewrite takes an incoming URL and rewrites it as something else. If the
new URL is internal it fetches the page and serves it and the browser is
not aware of the rewrite.

However, if the new URL is external, apache simply serves up a normal
redirect message which causes the browser URL to change.

If you want apache to go to the external site, get the page then serve
it - pretending it came from inside - then you need to think about
proxying. You need mod_proxy installed then you do something like (from
the RweriteRule doc, hint, hint...)

^localpath(.*) http://otherhost/otherpath$1 [P]
http://otherhost/otherpath/pathinfo via internal proxy

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message