News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

.htaccess password protection problem

Started by danjayh, March 12, 2007, 03:19:29 PM

Previous topic - Next topic

danjayh

I have a directory on my site that is supposed to be protected with a password (accomplished using .htaccess/.htpasswd), and when the path changed (to /home/fpgsweb/users/ ...), directory was no longer accessible.  I updated the path for .htpasswd in .htaccess to account for the new directory structure, but now whenever I attempt to access this directory, I am immediately redirected to a freepgs 403 page rather than being given the opportunity to enter a user name and password.  Is the use of .htaccess no longer supported, or am I just doing something wrong?

Thanks!

brainiac744

I'm pretty sure the proper path is /fpgs/fpgshttpd/YOURUSERNAME

danjayh

I have tried both paths.  I have tried both:

AuthName "Password Protected Directory"
AuthType Basic
AuthUserFile "/fpgs/fpgshttpd/danjayh/(password protected directory)/.htpasswd"
Require valid-user


and

AuthName "Password Protected Directory"
AuthType Basic
AuthUserFile "/home/fpgsweb/users/danjayh/(password protected directory)/.htpasswd"
Require valid-user

Both with a valid .htpasswd, and neither seems to work (please note that "(password protected directory) varies depending upon what directory the file has been placed in .. so far I've only tried it on one, but plan to do this with a few others as well).  This had been working in the past, before I received notice from freepgs of the path change for scripts to /home/fpgsweb/....; it broke when the path changed, and updating the .htaccess with the new path doesn't seem to help.

brainiac744

You might try using the password protected directory utility in the options panel then, perhaps you'll have more success with that (even though I'm fairly certain it's just going to write an htaccess and htpasswd file)

danjayh

Already tried, it does just give a .htaccess and .htpasswd.. Thanks for the suggestion, though.

danjayh

Fixed it!  As it turns out, the online file manager sets the permissions automatically to 600, and since I didn't change them to allow reads (644), the webserver was giving me an error (duh!).  Also, I ended up having to use the "new" path (/home/fpgsweb/users/USERNAME/) to point to my .htpasswd.  I hope that somebody finds this information useful!