Page 1 of 1

Blocking sites useing URL's in htaccess

Posted: Fri Jan 04, 2008 5:37 pm
by turtleman
It seems I'm getting hundreds of links to my site from outside sources, Normally I don't think thats a bad thing but in this case I don't want these links to me from the site there coming from and I don't know how to stop it.
Is there a way to block a specific URL in my htaccess file instead of blocking a series of IP's?

In my CPanel/Stats/Links from an external page (other web sites except search engines) theres been a large increase of in-bound links, sadly there not from good sites, mostly malware type sites or just good deals on smokes or porn ect.ect.ect. I'm guessing theres a connection with all the returned mail I got returned that came from "some-unknown name@my site.com..

How do I stop this chit?

Blocking sites useing URL's in htaccess

Posted: Fri Jan 04, 2008 6:09 pm
by NightStorm
[quote name='.htaccess']#block referring domains
RewriteEngine on
RewriteCond %{HTTP_REFERER} domain\.com [NC]
RewriteRule .* - [F][/quote]Something like that would block the referring URL. Is that the sort of thing you are after?

Blocking sites useing URL's in htaccess

Posted: Sat Jan 12, 2008 5:34 pm
by turtleman
Sorry about being so slow in getting back here............ (It's a Turtle thing I think)

Anyways I think this is working, my error logs jumped, but the referring site's have dropped, well not really dropped but they've changed the URL's from [url="http://domain.com"]http://domain.com[/url] to [url="http://www.domain.com.."]http://www.domain.com..[/url]. LOL..

I think I can see this turning into the Old Days of Viper's Deny List..