Protect Image From Other Sites
13
Jun0
Jun0
Sometimes other sites use our images, but there is no link us. Only it is fill our bandwidth limit. We can ban that users or we can show another image for that sites. You can write that image “This images can download in www.domain.com”. You have to add this codes to .htaccess
Change domain with your domain name and sucks.jpe is your image to show
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com/.*$ [NC]
RewriteRule .*\.(gif|jpg)$ http://www.domain.com/sucks.jpe [R,NC,L]
</ifModule>
If you want to serve a standard 403 forbidden error page
RewriteRule .*\.(gif|jpg)$ - [F,L]
If you want to add your friends sites to allow link
RewriteCond %{HTTP_REFERER} !^http://(www\.)?myfriend\.com/.*$ [NC]
View this post on FriendFeed
Liked by
- Hasan Yaşar
No Comments
No comments yet.
Sorry, the comment form is closed at this time.

