开发者

How to hide two subdomains under the only one

I have two servers (two providers, two ip adressess, different systems Linux an开发者_JAVA百科d Apache/Windows and IIS). First one is in dns as www.blah.cz and blah.cz and the second one as subdomain.blah.cz (with Apache). Now I want to mask subdomain.blah.cz as www.blah.cz/subdomain.

I expect that I need to perform a redirection from www.blah.cz/subdomain* do subdomain.blah.cz and create a rewrite rules on this subdomain. But I'm not sure if it is enough, or if it is even possible.

Have anyone been solving similar task, please?

regards Jan


Well normally the rewrite rules deal with everything being local, so if f you would like the subdomain to appear under the www, you either need to Proxy/Reverse Proxy the requests from the www server to the subdomain server, or if you just care what the url bar looks like, and not if the Client connects directly to the sub domain, you could do something like a frame set.

Assuming the proxy method, in apache you can do something like this

ProxyPass /subdomain http://subdomain.blah.cz
ProxyPassReverse /subdomain http://subdomain.blah.cz

making sure that you have mod_proxy enabled on your apache config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜