How to configure Anti-hotlinking?

Discussion in 'Installation/Configuration' started by tupacsoul, Mar 6, 2010.

  1. tupacsoul

    tupacsoul New Member

    Hi,

    I have a new VPS with ISPConfig 3, and I'm having speed problemms. The Anti-hotlinking is not configured, how can I do it if don't have .htaccess ?

    I've tried in Site menu, adding the htaccess parameters, but doesn't work, images are being still displayed...

    What can I do?

    Thanks
     
  2. damir

    damir New Member

    It's very easy to do with .htaccess.

    Below is a example with custom error message that is gonna be shown to user that tries to hotlink.

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

    tupacsoul New Member

    Thanks... but where must I locate this file?

    In /var/www/www.myweb.com/web/.htaccess ???

    If i put it in here, I get error500

    Thanks
     
    Last edited: Mar 6, 2010
  4. falko

    falko Super Moderator ISPConfig Developer

    What's in Apache's error log?
    Is the rewrite module enabled?
     
  5. tupacsoul

    tupacsoul New Member

    The rewritable mode is on, and i cant configure htaccess
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's in Apache's error log?
     

Share This Page