我们有这样的网址
第一个和第二个网址的页面是相同的。我需要创建301 redirect
?page=1
至/category
,除“类别”外,还有变量。
我试过这个:
RewriteCond %{REQUEST_URI} [a-z]
RewriteCond %{QUERY_STRING} ^page=1$
RewriteRule ^%1%2$ site_com/%1 [R=301,L]
答案 0 :(得分:0)
试试这个
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} ^page=1$ [NC]
RewriteRule ^site/(.+)$ site/$1? [R=301,NC,L]