Disallow other people to link to images on my site

Posted on 2003-03-27
Medium Priority
Last Modified: 2010-03-04
I've seen on like geocities sites where if you try to link to a picture from one of their sites it replaces it with another saying that it is hosted by them, and other web servers that replace it with something that says you can't link to their images.  Is there a way to set up apache 2 to do this?
Question by:VooICPDoo
  • 2
LVL 15

Accepted Solution

samri earned 150 total points
ID: 8226239
hi VoolCPDoo,

Check out Apache FAQ website for how this could be achieved;


The following configuration will produce the desired effect if the browser passes correct REFERER headers.

     SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
     SetEnvIf REFERER "^$" linked_from_here

     <Directory /www/images>
         Order deny,allow
         Deny from all
         Allow from env=linked_from_here


some examples (again from Apache website).
LVL 15

Expert Comment

ID: 8226262

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question