• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do I prevent hotlinking to my website?

Jeff7

Lifer
My website is hosted at Gisol.com. I've tried a few .htaccess generators, such as something like this:
--------------------
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?jeff7.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.jeff7.com/~~~~~~hotlink.png [R,NC]

Options -Indexes
--------------------

Some problems then show up:
Hotlinked images here still work fine.
Hotlink htaccess tester - while the hotlinked images at the SHSPVR site work fine, this site will either show no image, or it will attempt to contact my server 10 or more times before giving up.

So it seems that this .htaccess is not quite doing the trick. Any ideas on what's going on?
My eventual goal: Prevent all hotlinking except to sites I specifically allow.
 
Good point - though those folks seem to have something going that's a LOT more complex than I may need.
That, and when I go to their Sourceforge page, and click Download, it says "No File Packages Defined - This project has not yet created any file release packages."
 
Well I think I've nearly got it. My htaccess blocks hotlinks at sites like this blog, and a few others. One was hotlinking to a 152KB image for use as a background image. I replaced it with this. She got the idea.....not to hotlink to my server. Now she's hotlinking to a 450KB image on someone else's server. Her entire website is more than 600KB, including an auto-playing music file.:roll: M4D 733T HTM7 SK!77Z

Still having trouble getting it to work right from eBay though, such as from this past auction.
Neither of these lines has any effect:
RewriteCond %{HTTP_REFERER} !^http(s)?://<cgi\.)?ebay.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ebay.com [NC]
 
Originally posted by: joedrake
Awww you shoulda put something innapropiate!

I know, but it was her first offense, and she obviously doesn't have even the slightest clue about what she's doing online. I probably should have included a definition of "hotlink" as her subsequent actions (simply hotlinking to another site) indicate that she is totally clueless.

And I think I got the eBay thing to work now - updated the .htaccess file in my auction folder. It's more of a patch though - I don't know why the main .htaccess file won't allow eBay's servers to access those images.
 
Interesting discovery:
Back to the top. My .htaccess seemed to do an ok job of preventing hotlinking, especially seeing how my hotlink.png file is my single most-requested file on my webserver. :Q
But one site I just found, Riff Raff Running, has hotlinked to an image on my site, and it loads fine for them. (The post is most of the way down on the page. Search the page for "I hope it doesn't" and you should find it quickly.
Instead of the popular "sunny day" picture there, it should show my hotlink.png file, but it doesn't.
Anyone here happen to know why that is?


Edit: This is what is supposed to happen when someone hotlinks.

Second edit: When I load the Riff Raff page in Firefox, the sunny day.jpg file loads. In IE, the hotlink.png file loads.😕
Another example - in Firefox, the image loads. In IE, the hotlink.png file loads like it's supposed to. Is Firefox behaving badly, or is Xanga.com?
 
For the sake of keeping the AT effect from using your jeff7.com.png why dont you change that part of the code... LoL

Very cool BTW....... I assume MOD_REWRITE is enabled.





SHUX
 
Originally posted by: Shuxclams
Very cool BTW....... I assume MOD_REWRITE is enabled.

Uh....sure! Why not?

?????

I assume it is enabled because it is referenced in the .htaccess, and hotlinkers are successfully diverted to the hotlink.png image most of the time. Other than that, I haven't got a clue about what exactly MOD-REWRITE is.

I researched this enough to get it to have some basic degree of functionality. I guess there is a lot more to it.
 
Originally posted by: Jeff7
Interesting discovery:
Back to the top. My .htaccess seemed to do an ok job of preventing hotlinking, especially seeing how my hotlink.png file is my single most-requested file on my webserver. :Q
But one site I just found, Riff Raff Running, has hotlinked to an image on my site, and it loads fine for them. (The post is most of the way down on the page. Search the page for "I hope it doesn't" and you should find it quickly.
Instead of the popular "sunny day" picture there, it should show my hotlink.png file, but it doesn't.
Anyone here happen to know why that is?


Edit: This is what is supposed to happen when someone hotlinks.

Second edit: When I load the Riff Raff page in Firefox, the sunny day.jpg file loads. In IE, the hotlink.png file loads.😕
Another example - in Firefox, the image loads. In IE, the hotlink.png file loads like it's supposed to. Is Firefox behaving badly, or is Xanga.com?


Are you sure its not your cache? On the Riff Raff page, I see the jeff7.png file come up
 
Originally posted by: computeerrgghh
Originally posted by: Jeff7
Interesting discovery:
Back to the top. My .htaccess seemed to do an ok job of preventing hotlinking, especially seeing how my hotlink.png file is my single most-requested file on my webserver. :Q
But one site I just found, Riff Raff Running, has hotlinked to an image on my site, and it loads fine for them. (The post is most of the way down on the page. Search the page for "I hope it doesn't" and you should find it quickly.
Instead of the popular "sunny day" picture there, it should show my hotlink.png file, but it doesn't.
Anyone here happen to know why that is?


Edit: This is what is supposed to happen when someone hotlinks.

Second edit: When I load the Riff Raff page in Firefox, the sunny day.jpg file loads. In IE, the hotlink.png file loads.😕
Another example - in Firefox, the image loads. In IE, the hotlink.png file loads like it's supposed to. Is Firefox behaving badly, or is Xanga.com?


Are you sure its not your cache? On the Riff Raff page, I see the jeff7.png file come up

<Chief Wiggum>
Alright, I'm going to have to write you up for a Ten-niner-seven, making an officer look like an idiot.
</Wiggum>


Grrrr.....
Ok people, go back to your homes. Nothing to see here. 😱

I get the "J00 suck 4t t3h !ntr4w3b" award for this week.
 
Originally posted by: Jeff7
Originally posted by: computeerrgghh
Originally posted by: Jeff7
Interesting discovery:
Back to the top. My .htaccess seemed to do an ok job of preventing hotlinking, especially seeing how my hotlink.png file is my single most-requested file on my webserver. :Q
But one site I just found, Riff Raff Running, has hotlinked to an image on my site, and it loads fine for them. (The post is most of the way down on the page. Search the page for "I hope it doesn't" and you should find it quickly.
Instead of the popular "sunny day" picture there, it should show my hotlink.png file, but it doesn't.
Anyone here happen to know why that is?


Edit: This is what is supposed to happen when someone hotlinks.

Second edit: When I load the Riff Raff page in Firefox, the sunny day.jpg file loads. In IE, the hotlink.png file loads.😕
Another example - in Firefox, the image loads. In IE, the hotlink.png file loads like it's supposed to. Is Firefox behaving badly, or is Xanga.com?


Are you sure its not your cache? On the Riff Raff page, I see the jeff7.png file come up

<Chief Wiggum>
Alright, I'm going to have to write you up for a Ten-niner-seven, making an officer look like an idiot.
</Wiggum>


Grrrr.....
Ok people, go back to your homes. Nothing to see here. 😱

I get the "J00 suck 4t t3h !ntr4w3b" award for this week.


rofl

:cookie:
 
Back
Top