Created
October 24, 2018 02:40
-
-
Save hidonet/76a55191317fc33b23e701f26c0f1033 to your computer and use it in GitHub Desktop.
Pevent Wordpress PHP Upload Hack
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
<DirectoryMatch ^.*/wp-content/uploads/.*> | |
AllowOverride all | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*)\.php$ / [L,R=301] | |
</IfModule> | |
</DirectoryMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add these lines to /usr/local/apache/conf/includes/pre_virtualhost_global.conf and restart httpd...