Web Hosting Talk







View Full Version : Help needed with hot linking Using Mod_rewrite?


KID18
02-16-2001, 04:41 PM
I can not get this to work i put the following in a .htaccess file in the directory where the images are.


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://your_server.com/bad.gif [R]


I uploaded it in ASCII and my server is a VA Linux running Red Hat Modified Linux 6.0 will this not work on this kind of server? My host was using BSDi servers but im soupoused to be on a VA Linux now maybe it doesn't work on either one of those, i have no idea :) can anyone help? thanks



Got this from...http://faq.solutionscripts.com/misc/hot_linking.html

energy
02-16-2001, 07:30 PM
Does you host have mod_rewirte installed?
Is it enabled in .htaccess files?

KID18
02-17-2001, 02:13 PM
no they don't have that installed what should i do now? Id have to use cgi or something now wouldnt i?

energy
02-17-2001, 04:28 PM
"what should i do now? "
Look for a host that has mod_rewrite installed....

Website Rob
02-18-2001, 02:54 AM
It looks like you are trying to prevent leeching images from your site. If that is correct, use the search term "anti-leech" at any script site ( like http://www.cgi-resources.com ) and see what you like.