Naren Verma
Naren Verma

Reputation: 2307

Protecting files using htpasswd but every time it's not accepting the password

I am using hostinger hosting,

I have my root folder /public_html and I have added the .htpasswd file in this folder.

I have another folder called /publish_html/demo and I have to protect this folder so I have added the .htaccess file to this folder.

Below is the code I have in .htaccess file

AuthType Basic 
AuthName "My Protected Folder" 
AuthUserFile /public_html/.htpasswd 
require valid-user

And below is the code that I have in .htpasswd file. I have generated from this link

Test:$apr1$6z74iw3s$6P2i3Q1XGquJ/W.K5FIVu1

Now when I check my demo URL then I am getting a popup to add the username and password but every time it's not accepting the details.

Any idea what is the issue? I have checked this on Google but most of the answer saying about the AWS config file. I am using shared hosting.

Upvotes: 0

Views: 184

Answers (0)

Related Questions