我需要将site / old-domain /的所有页面重定向到/ new-domain /,并且很难使用Wordpress的重定向插件找出简单的正则表达式。谷歌搜索没有帮助,或者我遗漏了一些基本的东西。
例如,我想重定向 / old-domain / photos / cats TO:/ new-domain / photos / cats
和/ old-domain / products / shoes TO:/ new-domain / products / shoes
我虽然应该输入: old-domain /(.*)>新域/ $ 1
但这没有效果。
提前感谢您的帮助。
答案 0 :(得分:0)
答案 1 :(得分:0)
感谢大家的帮助。你对语法完全正确。此外,您无法将原始域放入源框中。
以下是其他人发现此问题的答案和语法(我在谷歌搜索时非常困难)
将olddomain.com重定向到newdomain.com:
/(.*)
http://newdomain.com/$1/
<make sure the regex button is checked>