Home > front end >  Block visits that uses a strange parameter (?mdrv=)
Block visits that uses a strange parameter (?mdrv=)

Time:03-09

I have received (one time per month, not something to be worried but just strange) scraping visits that use a determined parameter: ?mdrv=. The problem is that these visits are from different IPs so blocking the IP is not a solution.

For example: example.com/?mdrv=, /category/the_category?mdrv= or /year/month/article.html?mdrv= (home page, category pages, post pages from home page or megamenu or simple pages in menu like /contact).

I´m trying to block this one but I cant get the correct code to block them (I get the one for home page but not for the others). How can I block them all?

CodePudding user response:

Something like this should do it

RewriteEngine On

RewriteCond %{THE_REQUEST} \s/ [^?]*\?mdrv=
RewriteRule ^ - [F,L]
  • Related