Greenguy's Board


Go Back   Greenguy's Board > Newbie Questions
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-01-22, 09:25 AM   #1
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
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
7hom4s is offline   Reply With Quote
Old 2005-01-22, 10:27 AM   #2
eskimoen
Rock stars ... is there anything they don't know?
 
Join Date: Aug 2004
Posts: 10
You can use http://www.htaccesstools.com/block-hitbots/
eskimoen is offline   Reply With Quote
Old 2005-01-22, 10:38 AM   #3
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by eskimoen
Thanks, I found that one too, but no matter how I try to import it to my excisting htaccess file, it screws everything up.

7hom4s
7hom4s is offline   Reply With Quote
Old 2005-01-22, 10:44 AM   #4
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
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
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-01-22, 10:49 AM   #5
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by cd34
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
It's nice of you to try to help me, but here's the problem: I can find a lot of sources showing me how to make the text, like the one above. But no where is it shown HOW to import it into my excisting htaccess. So it's useless for me, unless I know what the rest of my code should look like. I need my code rewritten, so that I can use both things.

7hom4s
7hom4s is offline   Reply With Quote
Old 2005-01-22, 10:53 AM   #6
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
just paste that snippet into your .htaccess above your anti-hotlink rules
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-01-22, 10:59 AM   #7
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by cd34
just paste that snippet into your .htaccess above your anti-hotlink rules
Snippet? Would you copy it into my htaccess that I've posted in this toppic?
I'm sorry for being so bad at this, but each time I try anything, nothing works at all.

7hom4s
7hom4s is offline   Reply With Quote
Old 2005-01-22, 11:00 AM   #8
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
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]
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-01-22, 11:16 AM   #9
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by cd34
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]

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
7hom4s is offline   Reply With Quote
Old 2005-01-23, 06:52 AM   #10
frankthetank
Stupid risks make life worth living
 
Join Date: Jan 2005
Location: Renesse NL
Posts: 386
Send a message via ICQ to frankthetank
Quote:
Originally Posted by 7hom4s
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
When you upload the .htaccess code, make sure to use ASCII mode and not binary. Binary will probably mess up your file.
frankthetank is offline   Reply With Quote
Old 2005-01-23, 07:00 AM   #11
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by frankthetank
When you upload the .htaccess code, make sure to use ASCII mode and not binary. Binary will probably mess up your file.
I did upload it in ascii mode, actually it seems to be because I had htaccess files spread all over the place, instead of just one covering from my main directory. This combined with the support at my hosting, got these leeches of my back, at least for now

7hom4s
7hom4s is offline   Reply With Quote
Old 2005-01-22, 12:22 PM   #12
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by cd34
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]

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.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-01-22, 11:23 AM   #13
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
you wouldn't get redirected because of those rules. You must have something else in the .htaccess
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-01-22, 11:29 AM   #14
7hom4s
A woman is like beer. They look good, they smell good, and you'd step over your own mother just to get one!
 
Join Date: Dec 2004
Posts: 50
Quote:
Originally Posted by cd34
you wouldn't get redirected because of those rules. You must have something else in the .htaccess
Well, that would make a lot of sense, only question is where? I've copied it exactly, so there's nothing left out. Could it be a matter of uploading it to a specific directory? I upload my htaccess to my main folder, in which all my galleries are.

7hom4s
7hom4s is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:42 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc