Wordpress Apache反向代理和无限循环
我有服务器A和B。服务器A承载主站点www.example.com,服务器B承载另一个使用子域test.example.com的站点。在服务器A上,我设置了一个反向代理,这样运行在test.example.com上的Wordpress站点就可以通过www.example.com/test访问 现在,我希望子域test.example.com对用户是“不可见的”,这样,对test.example.com的请求将重定向到www.example.com/test。 显然,这让我陷入了一个无限循环。我尝试了不同的方法来打破这个循环,但没有成功。 有办法做到这一点吗?Wordpress Apache反向代理和无限循环,wordpress,apache,reverse-proxy,Wordpress,Apache,Reverse Proxy,我有服务器A和B。服务器A承载主站点www.example.com,服务器B承载另一个使用子域test.example.com的站点。在服务器A上,我设置了一个反向代理,这样运行在test.example.com上的Wordpress站点就可以通过www.example.com/test访问 现在,我希望子域test.example.com对用户是“不可见的”,这样,对test.example.com的请求将重定向到www.example.com/test。 显然,这让我陷入了一个无限循环。我尝
<VirtualHost *:80>
ServerName test.example.com
RedirectMatch permanent ^/(.*) www.example.com/test
</VirtualHost>
ServerName test.example.com
RedirectMatch permanent^/(*)www.example.com/test
添加上述apache配置并重新启动apache。
ServerName test.example.com
RedirectMatch permanent^/(*)www.example.com/test
添加上面的apacheconf并重新启动apache