Last active
August 29, 2015 13:59
-
-
Save jasperf/acba59a1f0acf9b2e796 to your computer and use it in GitHub Desktop.
.htaccess authentication to protect wp-login.php against brute force attacks without blocking the whole site #wordpress #security #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
#http://tools.dynamicdrive.com/password/ | |
AuthType Basic | |
AuthName "Graag twee keer login invoeren en daarna standaaard WordPress login" | |
AuthUserFile /path/to/file/.htpasswd | |
<Files wp-login.php> | |
Require valid-user | |
</Files> | |
#Dreamhost required this directive above WP directive | |
#http://wiki.dreamhost.com/Password-protecting_directories#Password_Protecting_Directories_within_WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} ^/(failed_auth\.html).*$ [NC] | |
RewriteRule . - [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment