我为我的网站创建了 301 重定向代码。以下是我所有类别的代码以重定向到新网址
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^testsite.com/categories/city/$1 [nc]
rewriterule ^(.*)$ http://www.testsite.com/$1 [r=301,nc]
我想将http://www.testsite.com/categories/city/pune重定向到http://www.testsite.com/Pune
让我知道我的代码是否正确?
谢谢