我有带和不带查询字符串的 URL,例如:
http://example.com/product
和
http://example.com/product?color
我希望如果我的任何 URL 有查询字符串 (?anything),它会在 htaccess 的帮助下获得
Header set X-Robots-Tag "noindex, follow"
和
Header add Link 'My URL without query string; rel="canonical"'
谢谢!