• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Blocking external image Hotlinks

motowebmaster

New Pleskian
Trying to keep other sites from hotlinking to my site's images.

I've been working with the following in my vhost.conf file. If I remove the # signs on the respective four lines, run the reconfig psaadmin and restart apache, which will restart successfully - but none of my images will appear on my website:

Options +FollowSymlinks
RewriteEngine On
RewriteCond % !^$
RewriteCond % !^http://domainname.net/.*$ [NC]
RewriteCond % !^http://www.domainname.net/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|swf)$ - [F,NC]

Below is what SwSoft's Knowledgebase states to do in vhost.conf:

RewriteEngine on
RewriteCond % !^$
RewriteCond % !^http://(www\.)?MY_DOMAIN\.COM(/)?.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|swf)$ - [NC,F]

Which I tried as well, with the same results. Initially I thought that making the lines less complex it would help - but no dice.

Any thoughts?
 
Back
Top