如何使用.htaccess和Apache重定向以下网址以删除尾随的“/?fbtab = true”?
https://www.tudosaudavel.com/produto/kawa-kawa-piper-methysticum-forster-100g/?fbtab=true
到
https://www.tudosaudavel.com/produto/kawa-kawa-piper-methysticum-forster-100g
答案 0 :(得分:0)
检查查询字符串是否有fbtab=true
。
RewriteEngine On
RewriteCond %{QUERY_STRING} fbtab=true [NC]
RewriteRule ^(.*)/?$ /$1? [R=301,L]