![]() |
How do I block ONE domain in my htaccess?
I've tried just about anything. Can someone here please, please help me inserting a piece of code that will get rid of traffic from besthardcore.net?
This is my htaccess file as it is now, preventing only hotlinking, but not traffic from this useless tgp or whatever it is: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?sensual-ladies.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?catyxxx.com(/)?.*$ [NC] RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.sensual-ladies.com [R,NC] Can someone please help me, rewriting this, so I can just upload it? Each time I try to change it, I end up not having access to my sites, no matter from where I try to gain access. I just need this ONE single domain to get lost as soon as possible. 7hom4s |
You can use http://www.htaccesstools.com/block-hitbots/
|
Quote:
7hom4s |
RewriteEngine on
RewriteCond %{HTTP_REFERER} http://(www\.)?besthardcore.net(/)?.*$ [NC] RewriteRule .* - [F] This will 403 ANY traffic from besthardcore.net. You can define: ErrorDocument 403 http://www.domain.com and send them on their merry way |
Quote:
7hom4s |
just paste that snippet into your .htaccess above your anti-hotlink rules
|
Quote:
I'm sorry for being so bad at this, but each time I try anything, nothing works at all. 7hom4s |
RewriteEngine on
RewriteCond %{HTTP_REFERER} http://(www\.)?besthardcore.net(/)?.*$ [NC] RewriteRule .* - [F] RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?sensual-ladies.com(/)?.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://(www\.)?catyxxx.com(/)?.*$ [NC] RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.sensual-ladies.com [R,NC] |
Quote:
Now it happens again. If I import this & upload it to my host, I end up getting redirected even if I try my main page. Something just goes wrong every single time, I don't get it. 7hom4s |
you wouldn't get redirected because of those rules. You must have something else in the .htaccess
|
Quote:
7hom4s |
Quote:
I'm far from knowing what I'm doing, but could it be the lack of a ^ in front of http://(www\.)?besthardcore.net(/)?.*$ [NC] causing the problem? I have that in front of the domains I block. Copy and paste this new line: RewriteCond %{HTTP_REFERER} ^http://(www\.)?besthardcore.net(/)?.*$ [NC] over the current besthardcore.net line in your .htaccess and give it a swing. |
Quote:
|
Quote:
7hom4s |
All times are GMT -4. The time now is 12:31 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc