htaccess password prob

This is a discussion on "htaccess password prob" within the Other Programming Languages section. This forum, and the thread "htaccess password prob are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 3rd, 2007, 13:38
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 158
Thanks: 1
Thanked 0 Times in 0 Posts
htaccess password prob

having a problem trying to get it working. i have my htaccess file in my public folder and my htpasswd file in the protected folder however i keep getting a 500 internall error?
.htaccess
Code: Select all
AuthUserFile /root/public_html/hidden data/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user wsabstract
.htpasswd
Code: Select all
wsabstract:password
what am i missing?
Reply With Quote

  #2 (permalink)  
Old Apr 3rd, 2007, 19:15
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 158
Thanks: 1
Thanked 0 Times in 0 Posts
Re: htaccess password prob

any thoughts?
Reply With Quote
  #3 (permalink)  
Old Apr 4th, 2007, 15:14
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: htaccess password prob

Your last line in the .htaccess file; I just use:
Code: Select all
Require valid-user
You can then list your 'user-password' pairs in your .htpasswd file

Is your password coded into md5 format? If not, that is propably your problem.
Reply With Quote
  #4 (permalink)  
Old Apr 4th, 2007, 15:48
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 158
Thanks: 1
Thanked 0 Times in 0 Posts
Re: htaccess password prob

gave up on it, just created a simple php login script. don't think it was in md5 format. i'll check that out. Thanks
Reply With Quote
  #5 (permalink)  
Old Apr 8th, 2007, 20:39
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: htaccess password prob

Quote:
Originally Posted by karloff View Post
having a problem trying to get it working. i have my htaccess file in my public folder and my htpasswd file in the protected folder however i keep getting a 500 internall error?
If you have a look at the Apache error log, it should give you more details of what caused the "500". The "500 internal error" message is intentionally very bland and lacking in information so that users to a broken website aren't given too many cluse as to how to hack it, and the extra detail that the programmer needs to fix problems is made available to him/her throught the error logs
Reply With Quote
  #6 (permalink)  
Old Jul 3rd, 2007, 15:21
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: htaccess password prob

Is your user really 'wsabstract' as found in tutorials?

Secondly, the path to your .htpasswd file has to be your server path, not domain path, AND your directory name has a space in it. May be worth checking both if you haven't already sorted it.
Reply With Quote
  #7 (permalink)  
Old Jul 27th, 2007, 08:33
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: htaccess password prob

No solution guys...?
ahh...cammon...!!!

Just a tought! I am using a free Domain to upload my own small website for personal use. You guys are talking about this server path... So how am I going to know my server path if I am going to use this .htaccess in my site?

Here is my sample image of how my folder management in the domain file manager.
[ FolderTree ]

Thanks.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Jul 27th, 2007 at 08:49. Reason: Adding image attachment
Reply With Quote
  #8 (permalink)  
Old Jul 27th, 2007, 09:15
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: htaccess password prob

For example, you should have in .htaccess:

AuthUserFile e.g. /homepages/34/accountnumber/_hiddendirectory/pw_file
or some such.

/homepages/34/accountnumber or whatever, is your website path on the host's server. Somewhere in the help documentation with your hosting provider they will give you the server path for your site. If not, email them.

Hope that helps.
Reply With Quote
  #9 (permalink)  
Old Jul 28th, 2007, 01:30
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: htaccess password prob

Ok I found it..

But the server path of my site begin with a harddisk directory something like:

Code: Select all
c:/sites/content/m/o/n/moniesblog
So I will put it like this in my htaccess file?
Code: Select all
AuthUserFile c:/sites/content/m/o/n/moniesblog/.htpasswd

If this is true, then I should save my .htaccess file into whichever folder that I want to protect, am I right so far?

What about the htpasswd file(that contain the username and the encrypted password)? Where am I supposed to put it? Is it in my moniesblog directory or in some other specific folder?

Thanks..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #10 (permalink)  
Old Jul 28th, 2007, 08:41
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: htaccess password prob

Are you running from a local server i.e. on your home computer, or a web host? Unusual for a web host to have an absolute path beginning with c:/...

Anyway, the .htaccess file goes in the directory you are trying to protect. The .htaccess file contains the path to your (hidden) .htpasswd file. The password file can go anywhere - just make sure it's hidden.

Hope that helps.
Reply With Quote
  #11 (permalink)  
Old Jul 30th, 2007, 01:14
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Question Re: htaccess password prob

Thanks matelot..

I am actually using a free web host.
After checking with my web host, they said that free account does not support "htaccess".
Hemmm.... can you suggest me any free web host out there that support htaccess.

I am developing my personal website at the beginning stage, after it's complete, then I will think about buying a cheap domain.

Thanks again.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
Reply

Tags
htaccess password

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgot password and Change password PHP script Chono PHP Forum 4 May 16th, 2008 09:13
Password protecting pages (.htaccess) fernandopolania Web Page Design 10 Oct 24th, 2007 16:45
ie6 prob with header karloff Web Page Design 1 Apr 27th, 2007 21:05
BG prob in firefox tkey Web Page Design 6 Jun 5th, 2006 12:50
IE prob karloff Web Page Design 11 Apr 24th, 2006 11:41


All times are GMT. The time now is 16:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43