Last active
February 15, 2017 08:17
-
-
Save isholgueras/b01d82fbe0e6bebcecf112a0cffc5731 to your computer and use it in GitHub Desktop.
.htaccess to add inside the wp-content/uploads folder in wordpress to avoid php (and others scripts) execution
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 | |
#if the file does not have one of theses extensions | |
RewriteCond %{REQUEST_URI} !\.(png|jpg|jpeg|gif|js|css|zip|pdf)$ | |
#then it should be marked as forbidden. | |
RewriteRule .*$ - [F] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment