Are you tired of those pesky non-logged in users downloading content on your precious WordPress website? Here’s a simple solution using the power of the .htaccess file!

RewriteBase /
RewriteCond %{REQUEST_FILENAME} ^.*(png|pdf|jpeg|jpg|gif|bmp|pdf|doc)$
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
RewriteRule . – [R=403,L]

Brian Singer

Principal
With over 20 years of website development experience, Brian brings a wealth of knowledge around data processing, website hosting, high-level marketing strategy, SEO, and more. Brian is a graduate from the McDonogh School, holds a B.F.A. in Imaging Arts and Sciences from Rochester Institute of Technology and serves on the board of several non-profits.

Comments

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Brian Singer

Principal
With over 20 years of website development experience, Brian brings a wealth of knowledge around data processing, website hosting, high-level marketing strategy, SEO, and more. Brian is a graduate from the McDonogh School, holds a B.F.A. in Imaging Arts and Sciences from Rochester Institute of Technology and serves on the board of several non-profits.

Post Details