cancel
Showing results for 
Search instead for 
Did you mean: 

.htsaccess help.

nevis2
Newbie
Posts: 2
Registered: ‎21-04-2014

.htsaccess help.

I'm trying to password protect a directory on my website using .htaccess and .htpassword - both files are placed in the directory that I wish to have password protected.
It's bringing up a 500 internal server error and I think it's because I have the wrong root directory details - I've read various threads on what it should say and tried a number of varients but still none the wiser. I'm an original freenetname customer.
Here's what I've been putting in my .htaccess file - As I say I've tried numerous varients and I think if I know the write line to put in AuthUserFile it will work ok.
AuthType Basic 
AuthName "restricted area" 
AuthUserFile /public_html/foldername/.htpasswd
require valid-user
Can anyone help?

David.
4 REPLIES 4
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: .htsaccess help.

The AuthUserFile entry needs to be the full path from the server root to the .htpasswd file (not just the part from the user root). Sorry, I don't know what this will be for freenetname users. I assume you haven't been migrated to the Hostopia cgi server?
David
David
jelv
Seasoned Hero
Posts: 26,785
Thanks: 971
Fixes: 10
Registered: ‎10-04-2007

Re: .htsaccess help.

You're making the assumption that this is ccgi - it could be on homepages!
jelv (a.k.a Spoon Whittler)
   Why I have left Plusnet (warning: long post!)   
Broadband: Andrews & Arnold Home::1 (FTTC 80/20)
Line rental: Pulse 8 Home Line Rental (£14.40/month)
Mobile: iD mobile (£4/month)
nevis2
Newbie
Posts: 2
Registered: ‎21-04-2014

Re: .htsaccess help.

Not sure what server I sit on but suspect I just don't have the full server root to make it work.
I tried the Plusnet format below too but it didn't work. My account was originally freenetname, who then merged into Madasafish which is now part of plus net so really difficult to tell how the link should read.
AuthUserFile /share/isp/plusnet/www/uu/username/htdocs/path/.htpasswd
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,977
Fixes: 316
Registered: ‎04-04-2007

Re: .htsaccess help.

Quote from: nevis2
Can anyone help?

Try this:
/share/isp/fnn/www/xx/username

Where 'xx' is the first two characters of your account username.
So if your username was 'nevis2' then try:
/share/isp/fnn/www/ne/nevis2

That points to the root of your webspace, so if your .htpasswd is in a directory like 'public_html' then you'd use:
/share/isp/fnn/www/ne/nevis2/public_html/.htpasswd

Edit: corrected file paths to make them specific to Freenetname.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵