我想將壞機器人重定向到錯誤頁面。下面的代碼效果很好,但我不知道如何將所有那些壞的機器人/IP 地址重定向到錯誤頁面 ( https://somesite.com/error_page.php) 有沒有辦法做到這一點?這是我在 .htaccess 文件中使用的內(nèi)容: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條經(jīng)驗 獲得超12個贊
401 是拒絕訪問狀態(tài)代碼。
所以在你的 htaccess 文件中寫:
錯誤文檔 401 /401.html
/401.html 是您創(chuàng)建的頁面,您可以隨意命名
- 1 回答
- 0 關(guān)注
- 155 瀏覽
添加回答
舉報
0/150
提交
取消