[英].htaccess redirect to subdomain on port 8000 without changing URL?
我們在我們網站的子域上托管了一個地圖應用程序,我們希望能夠從URL 訪問http://www.example.com/map/
問題是子域托管在不同的服務器上,而地圖應用程序位於端口8000上。
有沒有辦法從我們的主域上的/map/
重定向到地圖應用程序,而不使用.htaccess或PHP更改URL?
此外,我無權訪問托管地圖應用程序的服務器。
在www.example.com
vhost / server配置中使用mod_proxy
ProxyPass /map http://subdomain:8000/
ProxyPassReverse /map http://subdomain:8000/
在vhost / server 或 htaccess文件中使用mod_rewrite傳遞給mod_proxy:
RewriteEngine On
RewriteRule ^/?map/(.*)$ http://subdomain:8000/ [L,P]
ProxyPassReverse /map http://subdomain:8000/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.