Redirect website but maintain my url in browser address bar

两盒软妹~` 提交于 2019-12-24 11:35:30

问题


While our new website is under development we want to allow a small user base to look at the new site and get feedback. Our current site www.sitea.com will remain functional and available but we want them to visit www.sitea.com/v2 and have the browser maintain the url www.sitea.com/v2 but show the contents of the new site www.siteb.com is this possible?

Preferably this would be done with an .htaccess file if possible I am open to other suggestions though.


回答1:


Maybe, you can use ProxyPass for this

This directive allows remote servers to be mapped into the space of the local server.

I haven't used this myself, but something like this might work

<Location "/v2/">
    ProxyPass "http://www.siteb.com/"
</Location>

Unfortunately, this cannot be used in a .htaccess file. The Context lists only

Context: server config, virtual host, directory

See the manual for details.



来源:https://stackoverflow.com/questions/32961862/redirect-website-but-maintain-my-url-in-browser-address-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!