我有很多页面,SID=
其中包含我想要在 Google 中索引的参数noindex
,例如https://www.example.com.au/checkout/cart/?SID=c79e6055436bf371a02f4d2601cecd03
我在 htaccess 中使用了以下代码,但它似乎不匹配?
RewriteCond %{QUERY_STRING} ^SID=$
RewriteRule ^(.*)$ - [env=NOINDEXFOLLOW:true]
Header set X-Robots-Tag "noindex, follow" env=NOINDEXFOLLOW