Problems with Hotlinking

Discussion in 'Installation/Configuration' started by tupacsoul, Jul 13, 2010.

  1. tupacsoul

    tupacsoul New Member

    Hi.

    I have a blog in wordpress with many visits, and many images. This images are being hotlinked by another webs, and this is fatal for my server.

    I'm trying to configure in the ISPConfig panel, on "SITES/Configuration/" but the images are still being showed.

    How can I do that?

    PD: sorry about my poor english.
     
  2. damir

    damir New Member

    You can do this with .htaccess files.

    Example 1 disables hotlinking:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|png)$ - [F]
    Example 2 disables hotlinking and shows error message:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|png)$ http://www.yourdomain.com/error_message.png [R,L]
     
  3. tupacsoul

    tupacsoul New Member

    Where must I locate this .htaccess ? If I put this on web folder, I get error 500.

    All what i've read is that all htaccess sentences must be on ISPCONFIG Panel, on Sites/configuration...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you get a 500 error, look into the error log of the website to see what the reason is.
     
  5. tupacsoul

    tupacsoul New Member

    I get the error because in ISPConfig, the HTACCESS must be configured on Sites/options...
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No, thats not the case. You can configure it in a .htaccess file as well.
     
  7. tupacsoul

    tupacsoul New Member

    Oh, ok. I'll try. Thanks
     
  8. tupacsoul

    tupacsoul New Member

    Thanks, I found an .htaccess file hidden in the Web folder. Now it's OK. :)
     

Share This Page