AuthName takes one argument .htaccess 500 internal error

Description: In this post we’ll explain the error (.htaccess: AuthName takes one argument, The authentication realm (e.g. “Members Only”)) which is usually occurred in the writing the .htaccess file.

Basically when you writing the file “.htaccess” as follows:

AuthUserFile /home/user/domain/secretfolder/.htpasswd
AuthType Basic
AuthName “Login Details”
Require valid-user

It display the error as follows:

.htaccess: AuthName takes one argument, The authentication realm (e.g. “Members Only”)

This is because you put space in the AuthName “Login Details” and the it will take as two arguments not one, so the best way is to solve the error is to put the hyphen (-) between them like:

AuthName “Login-Details”

This will solve the issue regarding:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Have fun 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *