• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Simple mod_rewrite question

T

tobtob

Guest
I need to block myspace.com from externally linking to images on my site. I found a recent KB article titled " How do I prevent hotlinking graphics from my domain?" http://kb.swsoft.com/article_41_1026_en.html
I added the code suggested but it ends up blocking the images from displaying externally as well as not allowing them to be displayed on my own site.

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

Any ideas on why this doesn't work? Could it be the "dash" in the domain name ?
 
Back
Top