Problem with Password Protect Directories, to protect wp login
I have multisite wp install and I setup Password Protect Directories, to protect wp login, with the instructions I find hear:
https://www.inmotionhosting.com/support/website/wordpress/prevent-unauthorized-wp-admin-wp-login-php-attempts
Every thing was ok until the last step: /public_html/.htaccess
When I put this code, I get a 500 internal server error:
AuthType Basic
AuthName "Secure Area"
AuthUserFile "/home/example/.htpasswds/public_html/wp-admin/passwd"
require valid-user
Of course I replaced the user name with mine.
The server authentication window, previous to login, works any way.
Any idea? Thanks in advance
Thank you for your question on WordPress security. It seems that it may be WordFence that is conflicting. I would suggest disabling the plugin for a few moments to test out the .htaccess rule. If it works then you will know for sure the culprit. If you need an alternative I would suggest Bulletproof security for WordPress.
Best Regards,
TJ Edens