Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 19th, 2001, 04:15 PM
ajax's Avatar
ajax ajax is offline
Resident DJ
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 278 ajax User rank is Lance Corporal (50 - 100 Reputation Level)ajax User rank is Lance Corporal (50 - 100 Reputation Level)ajax User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 23 h 38 m 26 sec
Reputation Power: 8
Question

I've seen this done on some sites where if an image is linked from another Domain that it is either broken, denied or an error image shows up.

ex: http://www.mysite.com has an image called http://www.mysite.com/images/file.jpg

site: http://www.dumbsite.com uses my image directly from my site without saving it themselves so they are calling it with the full path. (<img src="http://www.mysite.com/images/file.jpg">)

How would i change my server to deny this and instead give an "error image?"

is this with .htaccess? or something else?

Reply With Quote
  #2  
Old February 20th, 2001, 04:36 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Start here -> http://forums.devshed.com/showthread.php?threadid=10280

Then here -> http://httpd.apache.org/docs/mod/core.html#filesmatch

Instead of using a Location block in my example, you should use FilesMatch.

Reply With Quote
  #3  
Old February 27th, 2001, 04:41 PM
ericparker ericparker is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 27 ericparker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
this should do the trick :

Add the following to the .htaccess file :

# Rewrite Rule for images
RewriteCond %{HTTP_REFERER} <URL of page accessing your domain>
RewriteRule ^(.*)$ http://<same as above URL>

You would replace the <URL of page accessing your domain> above with the domain name and path of the page that is referring to your domain. For example: http://www.their-isp.net/users/mypage/

The RewriteCond directive states that if the {HTTP_REFERER} matches the URL that follows, then use the RewriteRule directive. The RewriteRule directive will redirect any reference back to the referring web page.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > .htaccess?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway