Home > Net >  Error 500 protecting a single url with .htpasswd
Error 500 protecting a single url with .htpasswd

Time:01-15

I tried to implement this code into my .htaccess on wordpress.

Everything works fine but when you get access, it throws an 500 Error and redirects me to my hosting park website. It seems that it doesn't load the content. Not sure if the problem is that the path I'm providing doesn't contain the actual content.

SetEnvIf Request_URI ^/quetecalles require_auth=true

AuthUserFile /kaycho.com/wp-admin/.htpasswrd
AuthName "Password Protected"
AuthType Basic
Order Deny,Allow
Deny from all
Satisfy any
Require valid-user
Allow from env=!require_auth

The snippet is based on this article Error 500 protecting a single url with .htpasswd

CodePudding user response:

AuthUserFile /kaycho.com/wp-admin/.htpasswrd

The file-path to your password file looks incorrect. This needs to be an absolute filesystem-path, not a root relative URL-path (which is what this looks like). If the path is incorrect and the password file cannot be found then you'll get a 500 Internal Server Error response when submitting the user/password.

  •  Tags:  
  • Related