WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Hyflex
    Member
    Posted 1 year ago #

    Hey,

    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]
    </IfModule>

    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:
    http://www.ratingtheraces.com/premium-downloads/

    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
    Volunteer Moderator
    Posted 1 year 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