[英].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.