【发布时间】:2016-11-21 19:22:24
【问题描述】:
我有很多带有参数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
【问题讨论】:
标签: .htaccess mod-rewrite query-string noindex mod-headers