Forum Moderators: phranque

Message Too Old, No Replies

Howto proxy a fully qualified url to another proxy?

         

prateep

12:40 pm on Aug 16, 2010 (gmt 0)

10+ Year Member



Hi,

I'm not sure if this is possible, but I would like to rewrite a url and then proxy it through another proxy (squid).

For example, let's say I have a local url...

/about


and I want to rewrite that to a fully qualified url...

RewriteRule ^/about http://www.google.com/intl/en/about.html


and then proxy that through another squid proxy...

RewriteRule .* http://localhost:3128/ [P]



In this case, the URL is rewritten to / and then proxied through to localhost:3128. I want to preserve the full rewritten URL and then proxy that.

Any ideas?

thanks,

Prateep

lammert

1:21 pm on Aug 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi prateep, first of all Welcome to WebmasterWorld!

Have you considered using the Apache 2.x proxy module as an alternative for Squid? In that case rewriting and proxying the URL is done within the same application which creates a cleaner setup.

prateep

2:06 pm on Aug 16, 2010 (gmt 0)

10+ Year Member



Hi,

I think I found what I needed...

The ProxyRemote and ProxyRemoteMatch directives do what I want.

thanks,

Prateep