Htaccess

Error Message

Is htpasswd is working? because i put it and i get a 500 error on my website

Other Information

htpasswd itself works fine on our hosting. Our Protected Directories feature basically just generates htpasswd code for you.

However, setting up the configuration can be quite finicky to do by hand in my experience. And what doesn’t help is that most tutorials are just flat-out wrong. And if the config is wrong, you get a 500 error on your website.

So you could try to fix your code. If you get stuck, please tell us more about your setup here so we can try to help you.

Alternatively, you can just use our Protected Directories feature to generate the code for you.

6 Likes

i try to put this
AuthType Basic
AuthName “Restricted Access”
AuthUserFile /htdocs/.htpasswd
Require valid-user

its working on 1st try and then when you refresh the page it is returning to 500 internal server

Share the .htpasswd file and the location of both files

1 Like

It is on the same directory

fptv-29jim.is-best.net

.htpasswd
free:{SHA}jHw9FyfafaYNqYHpwAtZ+qHmn6w=

Then I believe this is wrong:


Use the directory privacy tool in the client area to guarantee correct setup

3 Likes

i visited it and it says 404 could not be found

https://dash.infinityfree.com/accounts/if0_37572244/protectedDirectories

This is wrong. You need the full path to the .htpasswd as it is relative to the server, not your hosting account.

You can find the home directory of your account in the control panel.

4 Likes

I assume that’s the URL in the control panel? That one doesn’t appear to work anymore.

But you can still access it directly from the client area.

  1. Go to your account.
  2. Find the domain name for which you want to setup protected directories and click Manage.
  3. On the next page, find the Protected Directories feature in the sidebar.
4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.