我为我的网站使用Wordpress Redirection Plugin和WPML Multi Langue插件 . Unfortunatley直到今天我使用不同语言的URL参数,如“https://example.com/some-permlink-dir/?lang=en " was for for the english version. now i would like to change it to " https://example.com/en/some-permlink-dir/”,因为我的网站上有很多子页面,重定向插件提供正则表达式我想知道如何告诉插件我想重定向所有流量从url参数到directiry版本因为不想为每个子页面添加重定向规则 . 任何想法我怎么能写出正确的正则表达式声明?
1 回答
在“添加新重定向”窗口中(提到here)
试试源网址:
\/(some-permlink-dir)\/\?lang=(\w+)
和目标网址:
/$1/some-permlink-dir/
Demo