我在zen cart框架中使用终极seo url。我有两种类型的URL结构需要重定向。
1)http://www.naturaflowers.com/anemones/wedding-anemone-flowers.html?somestring
到
http://www.naturaflowers.com/anemones/wedding-anemone-flowers.html
2)(***在这种情况下,仅参数/?page = 1时)如下所示
http://www.naturaflowers.com/wholesale-flowers.html?page=1
到
http://www.naturaflowers.com/wholesale-flowers.html
无法弄清楚。任何帮助将不胜感激。请!!
答案 0 :(得分:2)
尝试:
RewriteEngine On
RewriteCond %{THE_REQUEST} \?somestring
RewriteRule ^(anemones/wedding-anemone-flowers.html)$ /$1? [L,R]
RewriteCond %{THE_REQUEST} \?page=1($|&)
RewriteRUle ^(wholesale-flowers.html)$ /$1? [L,R]