我有这样的网址: my-site.com/index.php/2014。
我想删除这个url,并将它们都重定向到我的根域。谷歌被索引了很多这个网址,我的排名很低。他们以内容来评判我。
我想要重定向到根域的每个具有/后php文件扩展名的url。
示例:index.php/2004 -> index.php,team.php/2004/2004 -> team.php等。
谢谢你的帮助。
发布于 2015-07-13 12:13:59
RedirectMatch 301 ^/index\.php/(.+)$ http://example.com/index.php
RedirectMatch 301 ^/team\.php/(.+)$ http://example.com/team.php编辑:
您还可以只使用一行重定向来重定向您的urls:
RedirectMatch 301 ^/([^.]+)\.php/(.+)$ http://example.com/$1.phphttps://stackoverflow.com/questions/31382511
复制相似问题