我有一个URL,它像下面这样完美地工作:
http://www.naturaflowers.com/garland-&-wreaths/garland.html
现在谷歌网站管理员抓取网站并以以下两种格式获取相同的URL,并显示重复的错误
http://www.naturaflowers.com/garland-&-wreaths/garland.html
http://www.naturaflowers.com/garland-%26-wreaths/garland.html
现在我想把%26重定向到&字符,使它不会显示在谷歌网站管理员的副本。请帮助我克服这个问题。谢谢。
尝试:
RewriteCond %{THE_REQUEST} /garland-%26-wreaths/garland.html
RewriteRule ^(.*)garland-&-wreaths/garland.html$ /$1garland-&-wreaths/garland.html [L,R=301]