• Resolved t-ryder

    (@ryder203)


    Hi there and thanks for your awesome work on All In One WP Security & Firewall.

    I got a problem which leads me to a feature request; my page is on bananas.com (example) with a wordpress install. On the webspace I got there is /httpdocs which contains /bananas and /project1 /project2 etc.. /project1 and 2 contain e.g. a simple HTML page. Now the hotlink prevention setting on the bananas.com wordpress installation forbids access to a background.jpg on project2.com – background-image: url(‘stuff/background.jpg’); is broken where <img src=”stuff/m_logo.svg” … still works, since it’s a SVG. If I disable the hotlink prevention in the plugin settings on bananas.com wordpress backend the other page works as it should.

    So could you add a hotlink prevention domain exceptions feature or tell me what to change in .htaccess so project2.com does not get blocked from bananas.com?

    Thankyous!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support vupdraft

    (@vupdraft)

    If you add the following code to your .htaccess you can specify sites that are excluded from the hotlinking rule.

    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain2.com [NC]

    Alternatively, you can exclude particular images from the rule by using the following

    RewriteRule \.(jpg|jpeg|png|gif)$ https://hpmouse.googlepages.com/hotlink.gif [NC,R,L]

    In between the () are the images you intend to block from hotlinking. To add more separate them with”|”

    Change ‘https://hpmouse.googlepages.com/hotlink.gif‘ to an image you’ve set, and whenever image hotlinking is detected, this image will show up. Just make sure this image is not hotlink protected, or your server may go into an endless loop.

    Thread Starter t-ryder

    (@ryder203)

    Thanks a lot, that did the job.

    Plugin Support vupdraft

    (@vupdraft)

    No problem, happy new year!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[FEATURE REQUEST] hotlink prevention domain exceptions’ is closed to new replies.