![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
||||
|
||||
Using mod_rewrite to prevent hotlinking and email harvestersI saw this linked to on my new hosts forum, but I thought it was really good so I posted it here.
http://www.websiteowner.info/tutoria...widththeft.asp This site explains what mod_rewrite can do and how to prevent hotlinking A link on the above link went to here: Blocking scumbag crawlers from your site . Its a bit old but I'm sure most of the same e-mail harvesting crawlers are still being used. Try looking here for newer ones possibly: http://simplythebest.net/info/userag...ollectors.html and this is a good one too: http://www.sendfakemail.com/fakemail/antispam.html Hope you find this useful. I'm thinking of setting up the mod_rewrite on my new host for loads of reasons now. |
|
#2
|
||||
|
||||
|
I've been wanting to try this out for a while...it should save me a lot of bandwidth on some of my websites. Time to try it out.
|
|
#3
|
||||
|
||||
|
Eureka....it works! And it took all of 30 seconds.
|
|
#4
|
||||
|
||||
|
I'm having a bit of trouble with it maybe you can help me Div. I've successfully prevented the hotlinking, but I'm having an adversary affect on my site in that its forbidding me to download from on the site too.
This is the .htaccess file on one of my subfolders that I'm trying to protect: Code:
Any ideas? |
|
#5
|
||||
|
||||
|
I would put in both,
RewriteCond %{HTTP_REFERER} !^http://www.topfunwebsites.com/.*$ [NC] and RewriteCond %{HTTP_REFERER} !^http://topfunwebsites.com/.*$ [NC] |
|
#6
|
||||
|
||||
|
Yeah I originally tried that. Something funny going on and I can't work it out. If try sticking it in my main .htaccess file I can't even access my site. I'm a bit confused now.
Rob The only page I want to allow people to download the zips from is: http://www.topfunwebsites.com/mambo/...age&Sub Menu= does that help in any way? |
|
#7
|
||||
|
||||
|
Setting the referer to your domain should allow people to download from the specified page, assuming that is where they see the links or are redirected to.
I remember when I first tried something like this, my site was inaccessible as well and I just gave up. What did you use to create the .htaccess file? A text editor I am assuming. I used notepad, and renamed it to .htaccess when I uploaded it the the "root" directory of my site. FWIW, I can access your site fine right now. |
|
#8
|
||||
|
||||
|
yeah I used notepad, I've had success with .htaccess in the past although I don't understand some of it.
Its currently not protected since I'm not trying to exclude my own users. I'm glad it works for you though. I can't remember where I saw it, but there's a rule you can make for images to display whatever image you want so it could be a form of self advertisement or just say that someone has stolen it. |
|
#9
|
||||
|
||||
|
Thanks for posting this Rob. I have seen alternate ways to protect from hotlinking as well, but this one seems to work the best.
|
|
#10
|
||||
|
||||
|
I'm glad that it works for someone that's what we are here at GIDForums to help each other out aren't we
Peace out Rob p.s. what are the alternative methods you have tried? |
Recent GIDBlog
Last Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The