PDA

View Full Version : Hot Linking Script...



nixonja
February 20th, 2003, 04:08
The bad news is your hotlink script did not work very well. I was able to refresh and circumvent the hot linking page quite eaisly. Please work on your hotlink script and resolve this issue.




ErrorDocument 404 /errorpages/404.shtml
ErrorDocument 500 /errorpages/500.html

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://forum.?????.net.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.????.net.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.?????.net.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|mid|zip|exe)$ http://www.????.net/errorpages/hotlink.shtml [R,NC]


Is someone able to tell me what's wrong with the above?

CareBear
February 20th, 2003, 04:41
maybe he used http://yourdomain.net/someimage.jpg ? :confused:
That wouldn't fit any of the regular expressions

ducktape
February 20th, 2003, 12:57
this works for me http://bennettweb.tripod.com/hotlink.html is a tripod page i have to test it

http://neonsonline.com is my real site

And I made the hotlink image big to blow out someones layout if they are using my images in a table. You prolly wont want to but this is my server so i have plenty of bandwidth

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yoursite.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://your-ip.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your-ip.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://www.yoursite.com/images/hotlink.gif [R]