FreePgs.com Forum

FreePgs Related => Support Requests => Topic started by: danjayh on March 12, 2007, 03:19:29 PM

Title: .htaccess password protection problem
Post by: danjayh on March 12, 2007, 03:19:29 PM
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!
Title: Re: .htaccess password protection problem
Post by: brainiac744 on March 12, 2007, 05:32:21 PM
I'm pretty sure the proper path is /fpgs/fpgshttpd/YOURUSERNAME
Title: Re: .htaccess password protection problem
Post by: danjayh on March 13, 2007, 01:49:01 PM
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.
Title: Re: .htaccess password protection problem
Post by: brainiac744 on March 13, 2007, 03:26:26 PM
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)
Title: Re: .htaccess password protection problem
Post by: danjayh on March 13, 2007, 04:53:22 PM
Already tried, it does just give a .htaccess and .htpasswd.. Thanks for the suggestion, though.
Title: Re: .htaccess password protection problem
Post by: danjayh on March 13, 2007, 05:11:41 PM
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!