How can I redirect URLs using the proxy module in Apache?
Posted
by LearningIT
on Server Fault
See other posts from Server Fault
or by LearningIT
Published on 2010-04-08T20:25:33Z
Indexed on
2010/04/08
20:33 UTC
Read the original article
Hit count: 237
This seems like a super-basic question but I am having a hard time tracking down a straightforward solution, so appreciate any help and patience with me on this:
I want to configure my Apache proxy server to redirect certain URLs so that, for example, a web browser HTTP request for www.olddomain.com gets passed to the proxy server which then routes the request to www.newdomain.com which sends a response to the proxy server which then passes it back to the web browser.
Seems so simple, yet I don't see how to achieve this on Apache. I know Squid/Squirm offer this functionality so am guessing I am missing something really basic. I know I can use RewriteRule to dynamically modify the URL and pass it to the proxy server, but I effectively want to do the reverse, whereby the proxy server receives the original URL, applies the RewriteRule, and then forwards the HTTP request to the new URL.
Hope that makes sense. Thanks in advance for any help.
© Server Fault or respective owner