【发布时间】:2017-04-25 06:18:44
【问题描述】:
我已经写了 htaccess 我的实际网址是
https://www.example.com/index.php?route=information/partnership_form
改写为
https://www.example.com/for-brands/partner-with-us
效果很好,因为我已经写了规则
`RewriteRule ^for-brands/partner-with-us$ https://www.example.com/index.php?route=information/partnership_form [NC,L]`
但如果某些用户直接访问https://www.example.com/index.php?route=information/partnership_form,我想要重定向
到
https://www.example.com/for-brands/partner-with-us
下面是我的代码重定向,但我已经尝试了很多方法来形成 stackoverflow 的其他链接,但我仍然找不到任何解决方案
rewriterule ^index\.php?route=information\/partnership_form(.*)$ /for-sports-brands/partner-with-us$1 [r=301,nc]
【问题讨论】: