cancel
Showing results for 
Search instead for 
Did you mean: 

htaccess problems

TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

htaccess problems

Tubby's on the phone no good on this one.... I've recently changed accounts at PlusNet, under my old one, which I've had for years, i had 3 directories protected by .htaccess/.htpassed files so only customers could download files. All worked perfectly...
Transferred the whole shooting match over to the new username, altered the username in the .htaccess, and these are being picked up BUT... when I put in a valid uername/password combination, i get:
500 Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@plus.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Any ideas as tech support are useless on this.
8 REPLIES 8
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: htaccess problems

I assume you edited the .htaccess and .htpasswd files using a text editor on a Windows PC. When you uploaded the amended files did you transfer them as text (ASCII) or binary? That misconfiguration error is frequently caused by the line endings in the files being Windows style (CRLF) rather than Linux (just LF). A text transfer is required.
David
TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

Re: htaccess problems

Thanks - I think it was notepad++ i used, but I'll reinstall textpad and save as unix.
TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

Re: htaccess problems

OK, so - edited with Textpad to ensure UNIX line ends. Forced binary transfer.
Still giving me 500 server error.
This all worked perfectly under another account name.
Is there something PN have to "switch on"?
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: htaccess problems

Nothing needs switching on beyond the standard set up as far as I'm aware. Is this on Homepages (static HTML) or CCGI webspace?
Does access to the directories work normally if the .htaccess and .htpasswd files are disabled (albeit allowing access to what should be protected content)?
David
TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

Re: htaccess problems

It's normal HTML space (in htdocs), and yes, it works normally if I take them out. The wierd thing is it all worked perfectly (still does actually) in the old html space.
TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

Re: htaccess problems

My .htaccess file is:
AuthUserFile /share/isp/plusnet/www/ic/<MyUserName>/htdocs/test/.htpasswd
AuthGroupFile /dev/null
AuthName Password required
AuthType Basic
require valid-user

My old username began with ic, so I asked if the ic is static, of the first two characters of the username - i was told the former.
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: htaccess problems

Well my understanding is that the characters ic need to be replaced by the first two characters of your new username. That applies in my case and is what the How to password protect your website guide says.
David
TymH
Newbie
Posts: 6
Registered: ‎03-12-2015

Re: htaccess problems

Thank you! The idiots in chat said the IC was static regardless of username...
Seems to be working now - thank you for your time.
Tym