too many requests - Wordpress mod-rewrite
Hi,
in refer to this thread:
Too many redirects on Wordpress
I have the problem that i want to install the htaccess protection for my wordpress blog.
So i want to protect the /wp-admin directory and the wp-login.php (both!)
I modified the htacces with:
AuthType Basic
AuthName "My Protected Area"
AuthUserFile /home/public_html/passwd
Require valid-user
But the problem is, that i get the "too many requests" - message and the protection is not working...
the default mod rewrite is this.
I have no idea how i modify this code, mod-rewrite is stupid and complicated...
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
has anybody ideas?
Thanks
dsca
-
This usually means the location to the auth file is incorrect and judging by what you have there, it most likely is: /home/public_html/passwd
That should look like this:/home/user/public_html/passwd
or are you trying to add protection for your entire server? Try using this via SSH, it will do everything for you, just make sure to remove the current rules you put in .htaccess:#Add .htaccess protection to a WP install. for user in CHANGEME ; do p4ssw0rd=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 12 | xargs) ; /usr/local/apache/bin/htpasswd -b -c /home/$user/.htaccesspasswd $user $p4ssw0rd ; echo "Username: $user" ; echo "Password: $p4ssw0rd" ; cat <> /home/$user/public_html/.htaccess # Popup login protection for WordPress admin # You can change the password in the /home/$user/.htaccesspasswd file. # To create a new login, you can use this site: http://www.htaccesstools.com/htpasswd-generator/ AuthType Basic AuthName "Secure Area" AuthUserFile "/home/$user/.htaccesspasswd" require valid-user ErrorDocument 401 default # End of popup login protection EOT done
Make sure to change CHANGEME with the cPanel username.0 -
Hello, Let us know if you have any additional questions after reviewing the previous post. Thanks! 0 -
i have no access to ssh-console... =( the path to htpasswd is correct. 0 -
Hello, You may want to reach out to your web hosting provider to verify no server-level settings are resulting in the error message you are facing. Otherwise, you could make changes to the .htaccess file via File Manager or FTP. Thanks! 0
Please sign in to leave a comment.
Comments
4 comments