Created
November 29, 2021 03:13
-
-
Save bagerathan/d0fbe58c3edc046fba128d01d7e9262c to your computer and use it in GitHub Desktop.
[Protect WP media files] #htaccess
This file contains 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
# Protect WP Media Files | |
# https://m0n.co/protect-media-files | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} /wp-content/uploads/ [NC] | |
RewriteCond %{HTTP_REFERER} !^https://example.com [NC] | |
RewriteRule .* - [F,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment