Блокировка ботов на сайте
Войти

Блокировка ботов на сайте

Блокировка ботов на сайте

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php 

RewriteCond 
%{HTTP_USER_AGENT} ^.*(google|GoogleBot|YandexMedia|YandexVideo|YandexBlogs|YandexImages|YandexDirect|yandex|YandexBot|YandexWebmaster|MJ12bot|Xenu's|Barkrowler|Cliqzbot|ltx71|Yahoo!|statdom|ASPSeek|AhrefsBot|Ahrefs|Anarchie|Aport|BackWeb|Baiduspider|Bandit|BatchFTP|Birubot|BlackWidow|Buddy|Butterfly|CICC|CamontSpider|CherryPicker|ChinaClaw|Collector|Copier|Crescent|Custo|DA|DIIbot|DISCo|DSurf15a|Demon|DotBot|Download|Drip|EasyDL|EirGrabber|EmailCollector|EmailSiphon|EmailWolf|Express|ExtractorPro|EyeNetIE|Ezooms|FairShare|FileHound|FlashGet|FrontPage|GetRight|GetSmart|GetWeb|Gigabot|Go-Ahead-Got-It|GrabNet|Grabber|Grafula|HMView|HTTrack|Indy|InterGET|Internet|InternetLinkagent|InternetSeer|Iria|JBH|JOC|JS-Kit|Java|JetCar|JustView|LeechFTP|LexiBot|Library|Linguee|LinkExchanger|LinkWalker|MIDown|MJ12bot|MLBot|MSFrontPage|MSIECrawler|MSProxy|Mag-Net|Magnet|Mass|MegaIndex|Memo|Mirror|Mister|NEWT|NICErsPRO|Navroad|NearSite|NetAnts|NetMechanic|NetSpider|NetZIP|Ninja|NjuiceBot|Nutch|Octopus|Offline|Openfind|PHP|PageGrabber|Papa|PingALink|Pockey|PostRank|Pump|Purebot|PycURL|QRVA|Quester|ReGet|RealDownload|Reaper|Recorder|SWeb|Scooter|Seeker|Siphon|SiteBot|SiteSnagger|Slurp|SlySearch|SmartDownload|Snake|Soup|SpaceBison|Spider|Stripper|Sucker|SuperBot|SuperHTTP|Surfbot|SurveyBot|Szukacz|Teleport|URLSpiderPro|Vacuum|Vampire|VoidEYE|Voyager|WWWOFFLE|WebAuto|WebCopier|WebEMailExtrac|WebFetch|WebGo|WebHook|WebLeacher|WebMiner|WebMirror|WebPictures|WebReaper|WebSauger|WebSpider|WebStripper|WebWhacker|WebZIP|Website|Webster|Wget|Whacker|Widow|Wonder|WordPress|Xaldon|Yeti|YottosBot|Zeus|almaden|andit|attach|autoemailspider|bingbot|bumblebee|craftbot|eCatch|eXtractor|email|gigabaz|gold|gotit|grub-client|httpdown|httrack|ia_archiver|internetseer|kmSearchBot|larbin|lftp|libwww|likse|lwp-trivial|msnbot|pavuk|pcBrowser|psbot|ptd-crawler|sitecheck|spbot|sproose|suggybot|tAkeOut|ttCrawler|webcollage|x-Tractor|Barkrowler).*$ [NC]
RewriteRule .* - [F,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*[^/])$ $1/ [L,R=301]

RewriteCond %{THE_REQUEST} //
RewriteRule ^.*$ $0 [R=302,L,NE]

?>
Теги:
php