This is possible if mod_proxy
is enabled in your Apache config.
Once mod_proxy
and mod_rewrite
are enabled place this rule in your DocumentRoot/.htaccess
file of sitehost
host:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?sitehost\.com$ [NC]
RewriteRule ^ http://www.mainsite.co.uk%{REQUEST_URI} [L,P]
P
flag is used for proxying the request to external URL.