The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hot Link: Does this work?

Discussion in 'General Discussion' started by kosmo, Apr 23, 2002.

  1. kosmo

    kosmo Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    403
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    All over Europe
    Hi,

    I have enabled Hotlink protection on one site and the .htaccess file looks like this:


    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://mydomain.ext/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain.ext/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.mydomain.ext/.*$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [R,NC]

    However links to images (jpg) of this site from another domain (on the same server) work perfect. Is this OK? Do I miss something?

    kosmo
     
  2. danzigcrux

    danzigcrux Registered

    Joined:
    Feb 15, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    The idea of enable "Hotlink Protection" for your site is to prevent other site to link to your image from their site unless you give them permission to do so. But, mostly, to prevent other site from stealing your bandwidth.

    So, in your case, the other domain should not have access to link to your site's image eventhough bith site are on the same server.
     
Loading...

Share This Page