Prevent Downloads unless referrer is a specific host/page via htaccess? (2 posts)

  1. Hyflex
    Posted 3 years ago #


    I'm looking for some help creating a htaccess rule
    Currently the only rule regarding files is:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    I need a rule to allow downloads to allow downloads from: http://www.domain.com/wp-content/uploads/year/month/file

    but only if the referring URL is:

    I've had a look around but I can't find anything to suit my needs or enough help/explaining to make my own rules.

    Thanks in advance
    - Hyflex

  2. Krishna
    Posted 3 years ago #

    You mean image downloads? I think there is no foolproof way to do that as almost anything that is on the internet can be downloaded.

Topic Closed

This topic has been closed to new replies.

About this Topic