Created
August 13, 2019 15:13
-
-
Save marcosnakamine/e04bcd2b9b7823e9d8d85527e7ead22e to your computer and use it in GitHub Desktop.
WordPress - Protect uploads folder when not logged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] | |
RewriteRule ^.*/uploads/.*$ http://domain.com/protected.jpg [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment