apache - .htaccess Mask Domain and hide url -
i trying subdomain show contents of domain, ability go area of other domain i.e. directories
so example client go "sub.domain-one.com" or more "sub.exampledomain.com/client_name". show content of "domain-two.com", development server, without client knowing.
i if possible keep base domain of "sub.domain-one.com" stay on live server can keep index.php on server. wish :)
my current code is
options +followsymlinks rewriteengine on rewritecond %{request_uri} !^(sub.)?domain-one.com/$1 rewritecond %{http_host} ^(sub.)?domain-one.com rewriterule ^(.*) http://domain-two.com/$1 [p,nc]
this code seems work extent (it let me go sub.domain-one.com if go sub.domain-one.com/client_name redirect browser url domain-two.com/client_name need hidden :(
thanks heaps in advanced
james
you need use proxypassreverse
in order rewrite redirects proxied site site proxying from. unfortunately, can't in htaccess file. in server/vhost config, you'll need create virtual host "sub.domtain-one.com"/"domain-one.com", use proxypass
:
proxypass / http://domain-two.com/ proxypassreverse / http://domain-two.com/
Comments
Post a Comment