如果URL包含其他ip的关键字,则Apache重定向URL

时间:2019-07-19 08:35:49

标签: apache url redirect mod-rewrite load-balancing

我正在尝试将所有包含关键字(帮助)的请求重定向到其他IP地址。

例如将https://xx.xx.xx.xx/home/help/test/location/html重定向到https://yy.yy.yy.yy/home/help/test/location/html

我只想更改ip地址,以防url中带有关键字“ help”。

最好更改应该在httpd.conf

我尝试过,但是没用

<VirtualHost 0.0.0.0:443>
  ServerName XX.XX.XX.XX
  Redirect /help https://yy.yy.yy.yy/help
</VirtualHost>

 <VirtualHost xx.xx.xx.xx:443>
      ServerName XX.XX.XX.XX
      Redirect /help https://yy.yy.yy.yy/help
    </VirtualHost>

出现“站点无法提供安全连接”的问题

0 个答案:

没有答案