亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

通過 .htaccess 將壞機器人重定向到錯誤頁面

通過 .htaccess 將壞機器人重定向到錯誤頁面

PHP
慕容3067478 2021-12-03 15:21:39
我想將壞機器人重定向到錯誤頁面。下面的代碼效果很好,但我不知道如何將所有那些壞的機器人/IP 地址重定向到錯誤頁面 ( https://somesite.com/error_page.php) 有沒有辦法做到這一點?這是我在 .htaccess 文件中使用的內容:Options All -IndexesRewriteEngine on# Block Bad Bots & ScrapersSetEnvIfNoCase User-Agent "Aboundex" bad_botSetEnvIfNoCase User-Agent "80legs" bad_botSetEnvIfNoCase User-Agent "360Spider" bad_botSetEnvIfNoCase User-Agent "^Java" bad_botSetEnvIfNoCase User-Agent "^Cogentbot" bad_botSetEnvIfNoCase User-Agent "^Alexibot" bad_botSetEnvIfNoCase User-Agent "^asterias" bad_botSetEnvIfNoCase User-Agent "^attach" bad_botSetEnvIfNoCase User-Agent "^BackDoorBot" bad_botSetEnvIfNoCase User-Agent "^BackWeb" bad_botSetEnvIfNoCase User-Agent "Bandit" bad_botSetEnvIfNoCase User-Agent "^BatchFTP" bad_botSetEnvIfNoCase User-Agent "^Bigfoot" bad_botSetEnvIfNoCase User-Agent "^Black.Hole" bad_botSetEnvIfNoCase User-Agent "^BlackWidow" bad_botSetEnvIfNoCase User-Agent "^BlowFish" bad_botSetEnvIfNoCase User-Agent "^BotALot" bad_botSetEnvIfNoCase User-Agent "Buddy" bad_botSetEnvIfNoCase User-Agent "^BuiltBotTough" bad_botSetEnvIfNoCase User-Agent "^Bullseye" bad_botSetEnvIfNoCase User-Agent "^BunnySlippers" bad_botSetEnvIfNoCase User-Agent "^Cegbfeieh" bad_botSetEnvIfNoCase User-Agent "^CheeseBot" bad_botSetEnvIfNoCase User-Agent "^CherryPicker" bad_botSetEnvIfNoCase User-Agent "^ChinaClaw" bad_botSetEnvIfNoCase User-Agent "Collector" bad_botSetEnvIfNoCase User-Agent "Copier" bad_botSetEnvIfNoCase User-Agent "^CopyRightCheck" bad_botSetEnvIfNoCase User-Agent "^cosmos" bad_botSetEnvIfNoCase User-Agent "^Crescent" bad_botSetEnvIfNoCase User-Agent "^Custo" bad_botSetEnvIfNoCase User-Agent "^AIBOT" bad_botSetEnvIfNoCase User-Agent "^DISCo" bad_botSetEnvIfNoCase User-Agent "^DIIbot" bad_botSetEnvIfNoCase User-Agent "^DittoSpyder" bad_botSetEnvIfNoCase User-Agent "^Download\ Demon" bad_bot如果有人能指出我正確的方向,我將不勝感激。任何幫助將不勝感激。
查看完整描述

1 回答

?
HUWWW

TA貢獻1874條經驗 獲得超12個贊

  • 401 是拒絕訪問狀態代碼。

  • 所以在你的 htaccess 文件中寫:

    錯誤文檔 401 /401.html

/401.html 是您創建的頁面,您可以隨意命名


查看完整回答
反對 回復 2021-12-03
  • 1 回答
  • 0 關注
  • 161 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號