vendredi 11 mai 2018

How to block a specific website browser agent?

Lately i'm facing some issues with a data mining bot, extracting data from my website everyday at certain hours of the day. This will not only waste my bandwidth but also giving wrong data to my google analytics.

They usually use amazonaws IPs to enter however lately they've switched to other host.

What remains static is that they use the same user agent. is there a way to block using useragent? This is because i've tried it but it failed. Hopefully i can get a light out of this.

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu HeadlessChrome HeadlessChrome Safari/537.36
RewriteRule .* - [R=503,L]




Aucun commentaire:

Enregistrer un commentaire