【发布时间】:2016-11-02 21:25:15
【问题描述】:
发生错误时,我正在尝试转发到另一台主机。我有这个,并且可以工作:
<VirtualHost *:80>
ServerName test.com.
ServerAlias test.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
RewriteEngine on
ErrorDocument 503 /503/
RewriteCond %{REQUEST_URI} ^/503/$
RewriteRule ^(.*)$ http://other.host.com/
</VirtualHost>
现在,当我有这个 URL:http://test.com/path/?param1=val1&param2=val2 并且出现 503 错误时,我想重定向到新的 URL:http://other.host.com/path/?param1=val1&param2=val2。
是否可以将 /path/?param1=val1¶m2=val2 转发到新主机?
PS:我运行的是 java 应用程序,而不是 php 应用程序
【问题讨论】: