Skip to content

Instantly share code, notes, and snippets.

@marcosnakamine
Created August 13, 2019 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosnakamine/e04bcd2b9b7823e9d8d85527e7ead22e to your computer and use it in GitHub Desktop.
Save marcosnakamine/e04bcd2b9b7823e9d8d85527e7ead22e to your computer and use it in GitHub Desktop.
WordPress - Protect uploads folder when not logged
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