Help - Search - Members - Calendar
Full Version: prevent hotlinking problem
Forums > Resource Center > Webmasters' Corner > Resolved Topics
add1cted2f1re
i want to prevent the hotlinking of images and i have this code...

it does what its supposed to, i mean, images cant be hotlinked, but what im trying to do is replace the hotlinked image with a different image and a link to my site....

this is what i have:

CODE
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?phoenixf1re.melilyn\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.melilyn.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://phoenixf1re.melilyn.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.hitherston.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.takecamera.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.autumn-sky.org.*$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
Stephire
An easier way would be to ask your host to do it through cPanel?
add1cted2f1re
yeah, but i want to do it this way b/c i would like to learn how
add1cted2f1re
its been 4 days.... so i think i am allowed to bump this
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.