apache - I want to redirect requests to domain A to a sub folder of domain B in vhosts config -
i have issue i'm having problems with:
i need redirect requests http://domaina.com http://domainb.com/somefolder/
it's understanding site has been built there, need requests come in http://domaina.com
i understand rewriting domain like, example, http://domaina.com/blog/index.php http://domainb.com/blog/index.php
can pointers on how achieve rewriting url, , adding in new path?
thanks,
sounds need use reverse proxy here.
in domaina config, can do
<virtualhost *:80> servername domaina.com proxypreservehost on proxypass / http://domainb.com/somefolder proxypassreverse / http://domainb.com/somefolder </virtualhost>
you'll take requests domaina , pass them domainb, proxypreservehost
directive ensure requests arriving @ domainb appear have come domaina. end user, browsing domaina, though content being served domainb.
you need make sure mod_proxy
, mod_proxy_http
enabled work.
Comments
Post a Comment