我一直在嘗試 410 一個由 Google 為我的一個客戶編制索引的數千個有毒 URL 的模式。我希望網站的每個 url 都包含?%發送 410 回應代碼,以便它們被取消索引。
網址示例:
https://www.example.com/fr/promotions?%252525253Bid_lang=6&p=6
我試圖把它放在.htaccessIf 模塊部分上方的 , 正如我在這里的另一個執行緒上發現的那樣,但它沒有用,有什么想法嗎?
RewriteRule ^[a-z]shop($|/) - [G]
uj5u.com熱心網友回復:
我希望包含 ?% 的網站的每個網址都發送 410 回應代碼
在檔案頂部使用 mod_rewrite .htaccess:
# Send 410 for any URL where the query string starts with "%"
RewriteCond %{QUERY_STRING} ^%
RewriteRule ^ - [G]
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/472440.html
標籤:.htaccess prestashop url路由 http-status-code-410
