Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Anyone know of a way that works to stop images being leached from galleries?

Thanks


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
.htaccess is your friend there if you want to prevent deeplinking those images from other sites.

Exampje 1 .htaccess that will deliver broken images to anyone deeplinking to it:

Code
RewriteEngine  on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?themepark.nl/.*$ [NC]
RewriteRule \.*$ - [F,NC]

v2 replaces any deeplinked image with our "don't steal the bandwith" image.

Code
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*themepark.nl/.*$ [NC]
RewriteRule \.(gif|GIF|jpg|JPG)$ dontstealourbandwith.gif [L]

Last edited by blaaskaak; 09/26/2007 12:42 PM.

[Linked Image from siemons.org]
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
hehe, even though you are pumping out a gif to tell them not to steal images (gif,jpg,png) laugh

just kidding blaask.. i also prefer #2 actually smile

Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
it's a 4k image we send out smile

[Linked Image from themepark.nl]

Last edited by blaaskaak; 09/26/2007 12:47 PM.

[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Thanks, however I don't think .htaccess files work with IIS


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
Hmm, I guess it doesn't. After googling I did find this: http://www.helicontech.com/hotlinkblocker/

There's more to explore, but it's not so easy as with apache.


[Linked Image from siemons.org]
Joined: Dec 2003
Posts: 1,798
Likes: 2
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,798
Likes: 2
I'm almost positive in windows you can block any site loading anything from your site where the request doesn't come from someone clicking on your site to begin with (like the referrer feature in threads). It's been a while tho. ntdoc may have an answer for you.


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Originally Posted by blaaskaak
Hmm, I guess it doesn't. After googling I did find this: http://www.helicontech.com/hotlinkblocker/

There's more to explore, but it's not so easy as with apache.

Thanks for this!


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Dec 2003
Posts: 1,798
Likes: 2
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,798
Likes: 2
http://mvolo.com/blogs/serverside/a...t_2D00_linking-with-IIS-and-ASP.NET.aspx

You can use his (free) .dll and keep people from leeching in IIS.


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 225
M
enthusiast
enthusiast
M Offline
Joined: Jun 2006
Posts: 225
Thanks Allen as well.. thats a great one, although having a few problems but ill keep at it smile thanks both! superb


Join Europes biggest BMW M Car owners site
M-Torque - www.mtorque.co.uk
Joined: Jun 2006
Posts: 16,535
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,535
Likes: 150
Hehe, another reason I prefer Apache to IIS (and yes, apache can run in Windows ;))


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 3,097
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,097
Likes: 1
Originally Posted by Gizmo
Hehe, another reason I prefer Apache to IIS (and yes, apache can run in Windows ;))

But most businesses that run Windows don't seem to want to run Apache.

I'm not sure how to do it myself either as I've not had to stop it from happening on IIS since the sites are typically in a LAN where it's not an issue.

If I run across anything I'll post back about it. There are a few great IIS blogs out there.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 4:34 PM
Selling a Forum?
by ECNet - 10/10/2026 10:54 AM
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Who's Online Now
0 members (), 233 guests, and 188 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)