Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts

    problems with .htaccess and disabling hotlinking

    I've uploaded the image 'redir.jpg' to my webserver, and an .htaccess file containing the following lines:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?artisticphotoz.com/.*$ [NC]
    RewriteRule \.(gif|jpg)$ http://artisticphotoz.com/redir.jpg [R,L]
    It's my understanding that this is supposed to replace the hotlinked image with the image 'redir.jpg'. However, all it seems to do is not display the hotlinked image (IE broken image box).

    Any ideas?

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Doing so is completely unreliable and you could end up making is so many people cannot even view the image. Referrer information is supplied by the web browser. Not all web browsers supply it, or supply it correctly, and some allow you to modify it.

    I spent some time trying to make this same method work reliably and it just isn't going to happen.

    It would have been nice if browsers had to follow a standard as far as supplying referrer information then this would work nicely.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •