Mobile app version of vmapp.org
Login or Join
Vandalay111

: Spam referers bypass htaccess rules Here is a sample code I'm using in .htaccess to block spam referers: RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://.*buttons-for-your-website.com/ [NC,OR] RewriteCond

@Vandalay111

Posted in: #Botattack #Htaccess #Referrer #Spam #WebCrawlers

Here is a sample code I'm using in .htaccess to block spam referers:

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://.*buttons-for-your-website.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*free-social-buttons.com/ [NC]
RewriteRule ^(.*)$ – [F,L]


Also, I have the following code in nginx configuration because I have nginx stands as a reverse proxy in front of apache:

if ($http_referer ~ "buttons-for-your-website.com|free-social-buttons.com")
{
return 403;
}


I'm still getting hits from buttons-for-your-website.com, by some way this bot can bypass all previous rules and I have no clue how. I've verified both htaccess rules and nginx configuration on a domain of mine and they blocked access to my website from that domain. So, how these bots are still able to visit my website? Appreicate your answers.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme