Blocking sites useing URL's in htaccess

Moderators: Moderator, Global Moderator

Post Reply
turtleman
Jr. Member
Jr. Member
Posts: 99
Joined: Thu Jun 17, 2004 12:37 am

Blocking sites useing URL's in htaccess

Post 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 [b]CPanel/Stats/Links from an external page (other web sites except search engines) [/b] 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?
Some people are like Slinkies. Not really good for anything, but you still can't help but smile when you see one tumble down the stairs.



Image
NightStorm
Administrator
Administrator
Posts: 778
Joined: Mon May 17, 2004 4:05 pm

Blocking sites useing URL's in htaccess

Post 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?
[align=center]Image



[gamertag]NightStormDraco[/gamertag]

[twitter]NightStormDraco[/twitter]

[/align]
turtleman
Jr. Member
Jr. Member
Posts: 99
Joined: Thu Jun 17, 2004 12:37 am

Blocking sites useing URL's in htaccess

Post 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..
Some people are like Slinkies. Not really good for anything, but you still can't help but smile when you see one tumble down the stairs.



Image
Post Reply

Return to “Security”