我有一个问题,因为我使用重写网址..
我的旧网址: Website.com/index.php?act=appdetail&appid=oWV
新重写网址 http://website.com/angry_birds_rio-appdetail-oWVi.html
但我所有的旧网址都在谷歌索引,如果有任何人来到我的网站,它显示旧的URL和谷歌也索引新的URL . 它在网站问题上制作重复页面 .
让我知道解决方案
我的重写URL htaccess
RewriteEngine On RewriteRule ^([^-]) - ([^-]) - ([^-]) - ([^-]) - ([^-] *) . html $ index.php?appanme = $ 1 &act = $ 2&appid = $ 3&page = $ 4&cat = $ 5 [L] RewriteRule ^([^-]) - ([^-]) - ([^-]) - ([^-]) - ([^-] ) - ([^-]) . html $ index.php?appanme = $ 1&act = $ 2&appid = $ 3&page = $ 4&cat = $ 5&sString = $ 5 [L] RewriteRule ^([^-]) - ([^-] ) - ([^-] *) . html $ index.php?appanme = $ 1&act = $ 2&appid = $ 3 [L]
2 回答
这是你的.htaccess文件:
您需要通知Web爬虫有关重定向的信息,并使用301代码对其进行操作 .
出现规则是基于.htaccess;如果存在一组CGI参数,则需要一组额外的规则来永久重定向(301)对index.php页面的BROWSER / CRAWLER请求到相应的别名,这将在几周内整理Google . 然后你的规则如上
Note :
1)你的第二条规则似乎有一个拼写错误:sString = $ 6 NOT sString = $ 5
2)如果您不清楚上述规则的作用,或者如果您想要更抽象的内容,请考虑以下post,那么Apache mod_rewrite文档值得一读 .