Apache‎ > ‎


To redirect to an internal address, one can preserve the URL with a regular mod rewrite P-Flag. But to redirect to an outside address you will get a 403 forbidden if you do it with the P-Flag. In that case, you have use mod_proxy as follows:

To redirect www.domain.com/search to http://domain.everyzing.com/ and mask the url (have apache act as a gateway)

ProxyRequests Off ProxyPreserveHost Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /search http://domain.everyzing.com/ ProxyPassReverse /search http://domain.everyzing.com/

Note that we need to run the following first

a2enmod proxy a2enmod proxy_http