Re: Update: Need help mod_rewrite and mod_proxy :(

Graham Leggett <[email protected]>
Newsgroups gmane.comp.apache.mod-proxy
Message-ID <[email protected]>
Lancashire, Pete wrote:

> If the host, inside, the one that is being hidden has
> a href that has a local reference, the proxy seems to
> fail.

The proxy isn't failing, your html is wrong.

> for example I have the file foo.html
> ------------------------------------------------------
> <html><head></head><body>
> This is /foo.html
> click <a href="bar.html">here</a> to go to bar.html
> <br>
> click <a href="http://inside/bar.html">here</a>
> to go to http://inside/bar.html
> <br>
> click <a href="http://inside.domain.xyz/bar.html">here</a>
> to go to http://inside.domain.xyz/bar.html
> </body> </html>
> ------------------------------------------------------
> 
> The first href will get the correct reverse proxy, the
> others will not,  returning the hostname that is in the
> href to the user.

Correct.

Keep fully qualified website links out of your pages. Proxy does not 
(and cannot) parse your HTML for you. Putting hardcoded URLs in pages 
makes websites difficult to maintain anyway.

As a general rule, relative links (blah.html) will always work, and are 
the most recommended. Absolute links (/dir/blah.html) will only work if 
you keep your URL space the same on the front and the back (which is 
good practice anyway). Hardcoded links (http://inside/dir/blah.html) 
will only ever work on that server, and are unmaintainable whether you 
use a proxy or not.

To my knowledge, MS Proxy server is likely to have the same problem.

Regards,
Graham
-- 
-----------------------------------------
[email protected] 
	"There's a moon
					over Bourbon Street
						tonight..."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.