|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
||||
|
||||
|
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? |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > .htaccess? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|