|
2005-02-03, 05:41 AM | #1 |
Searching for Jimmy Hoffa
Join Date: Jan 2005
Location: Long Island, NY
Posts: 771
|
.htaccess & hotlinking pictures
I was just reading over my stats for yesterday and saw quite a few people leeching by directly hotlinking. Should I just block the domains of the leechers or is there a better way to prevent hotlinking?
I was going to use this: RewriteEngine on RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?http://www.allhiphop.com.*$ [NC,OR] RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?http://www.siccness.net/.*$ [NC] RewriteRule .* - [F,L] I've never had to do this on my regular webpages so this is a little new to me. Any help would be appreciated. |
2005-02-03, 06:04 AM | #2 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
Check out this cool tool:
http://www.htaccesstools.com/hotlink-protection/ It will allow you to add domains that you will allow to hotlink from you, and block all others. For instance, if you want to allow yourself to link between your domains, add them into the Allowed Domains box.. it will allow you to hotlink from X domain to Y domain with no problem, but anyone else trying to hotlink will be blocked.
__________________
|
2005-02-03, 07:19 AM | #3 |
Searching for Jimmy Hoffa
Join Date: Jan 2005
Location: Long Island, NY
Posts: 771
|
Doesn't some tgps hotlink the thumbs? I think AskJolene does and I wouldn't want to block legit type traffic.
Need to figure this out because bandwidth is starting to become an issue, lol. |
2005-02-03, 03:35 PM | #4 |
No matter how good you are at something, there's always about a million people better than you
|
Hi Mr. Blue,
Here's a little something else to think about when using .htaccess files to protect images. If the person viewing your page (surfer or reviewer) happens to use firewall software that is set to strip the referrer field, all they will see on your page is broken images. I'm not sure how big of a problem this is but stripping the HTTP_REFERRER field is a default setting in many firewall programs. It's used to help keep web sites from tracking your surfing habbits. I use .htaccess files to protect my images from hotlinking and will continue to do so but it is food for thought. As far as TGPs hotlinking thumbs, I know some TGP scripts d/l a copy of one of your thumbs (or ask you to u/l one) and crop it to size to use as a link to your gallery. I'm not sure if .htaccess would cause a problem there but I can see how it could. Regards, SF |
2005-02-14, 07:43 PM | #5 |
The only guys who wear Hawaiian shirts are gay guys and big fat party animals
Join Date: Jun 2004
Posts: 175
|
have you sorted this out yet?
best way is to drop a htacess in your root and allow requests from your domain only RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http://yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http://your-ip [NC] RewriteRule [^/]+\.(exe|mpeg|mpg|avi|mp3|gif|jpg|JPG|GIF|MP3|AVI|JS|js)$ - [F] RewriteRule ^/cgi-bin/.+$ - [F] AddHandler server-parsed html ErrorDocument 404 http://www.yourdomain.com/404.htm
__________________
THE BIGGEST LIST OF EPASSPORTE SPONSORS YOU HAVE EVER SEEN |
2005-02-15, 01:37 PM | #6 |
Searching for Jimmy Hoffa
Join Date: Jan 2005
Location: Long Island, NY
Posts: 771
|
Actually I have sorted it...I hadn't realized just how much you could do with htaccess
I'm glad I sorted it out a week ago...someone decided to fusker me recently and it would have cost a pretty penny in bandwidth if I didn't have this in place, lol. |
2005-02-15, 02:56 PM | #7 | |
The only guys who wear Hawaiian shirts are gay guys and big fat party animals
Join Date: Jun 2004
Posts: 175
|
Quote:
ok thats awesome man - all the best
__________________
THE BIGGEST LIST OF EPASSPORTE SPONSORS YOU HAVE EVER SEEN |
|
|
|