我将apache httpd配置为应用替代。在我看来,这正是医生所说的。但是,它根本不执行任何操作。
怎么了
<VirtualHost domain:443>
SSLEngine on
....
ProxyPass /cms/ http://domain2/
ProxyPassReverse /cms/ http://domain2/
Substitute "s|div|DIV|ni"
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
(Centos上的Apache 2.4.16)
同时我想出了如何使其工作的方法
<VirtualHost domain:443>
SSLEngine on
....
# In some case the following line is neccessary
RequestHeader unset Accept-Encoding
<Location /cms >
ProxyPass http://domain2/
ProxyPassReverse http://domain2/
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|div|DIV|ni"
</Location>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我希望这可以帮助其他人克服类似的问题。
(经过艰苦的工作,Apache httpd是一个很棒的工具,我们用它来交换代理来源的网址;-))