Forum Moderators: phranque

Message Too Old, No Replies

.htaccess help

         

kwstang1986

3:46 am on Oct 17, 2004 (gmt 0)

10+ Year Member



HI, ran accross this forum while doing a google search on .htaccess and Godaddy. Hopefully someone can help me with this prob becasue Godaddy is no help!

Anyway, I would like to use the .htaccess file to protect one of my webpages/directories. I am not doing anything too fancy here so if someone wants me to post my code I really don't mind. Anyway, here is what I have so far:

AuthUserFilehome /whatgoeshere?/.htpasswd
AuthName myname
AuthType Basic
<Limit GET>
require valid-user
</Limit>

I got this far but have no clue what the local directory is. Thought it was just a simple /username/directory.

Also, have the .htpasswd file. Does this file need to be encryped? or can it be in plain text? Where can this file reside? Sorry for the ton of questions here but a newbee to this! Appreciate

kwstang1986

3:01 am on Oct 18, 2004 (gmt 0)

10+ Year Member



Actually, figured it out after two days of hacking!

jdMorgan

3:30 am on Oct 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



kwstang1986,

Welcome to WebmasterWorld!

Glad you got it working! The path for reaching the auth file is different depending on how your server is set up, so you probably stumped the panel.

Jim

milstone

12:56 am on Nov 9, 2004 (gmt 0)

10+ Year Member



What did you do to make it work? I'm having the same problem with Godaddy. They sent the correct path (why wasn't it published in their help files?) and it works to designate an alternate index file via .htaccess. However, I cannot get password protected access to work. it just says wrong username &/or password. I've tried encrypted, nonencrypted, no passwrod all without luck.

TIA.

Dave

kwstang1986

2:23 am on Nov 9, 2004 (gmt 0)

10+ Year Member



Ok, but it will cost ya!
Here is the basic code I used. First is the .htaccess:
AuthName www.somename.net
AuthUserFile /var/chroot/home/content/x/x/x/somename/html/directorytoprotect/.htpasswd
AuthGroupFile /var/chroot/home/content/x/x/x/somename/html/directorytoprotect.htpasswd
AuthType Basic
<Limit GET>
require valid-user
</Limit>

--------------
NOTE: the /x/x/x is the letters of your name. Example my name, ken /k/e/n/

--------------
The password file .htpasswd
kbear:55rKCZC8fvAls
waite:17P2cS.0soDyI

The user name is regualar ascii but the password has to be encoded. Goto this page: [euronet.nl...]

Place both these files in the directory you want to protect. If this does not work, post or stickymail me.

Good luck! I also called GoDaddy and for whatever reason they do not support .htaccess anymore, but if you are on an appache webserver you can use. Go figure! Let me know how you do. TTL

[edited by: jdMorgan at 4:29 am (utc) on Nov. 9, 2004]
[edit reason] Obscured specifics per TOS. [/edit]

kwstang1986

2:24 am on Nov 9, 2004 (gmt 0)

10+ Year Member



Ohhh the somename = your user name.

milstone

8:40 am on Nov 9, 2004 (gmt 0)

10+ Year Member



Thanks, very much. In the mean time I found PHPACCESS105 (http://www.krizleebear.de/index2.php) which has worked. In addition to working it provides a simple usseful interface for managing directory access via .htaccess.

I've examined the code generated by PHPACCESS105 and compared to your successful and my unsuccesssful code. I see no differences, except that the encrypted characters representing the passwords are different, of course. I had tried encryption algorithms on several web sites. <snip> It is a mystery to me, but now it works. Hopefully it will continue to work, because my confidence in troubleshooting is zero.

If I upload with DreamWeaver it doesn't work (text.ASCII requirement?), Fetch does.

Just today GoDaddy told me they do support .htaccess. In my experience, their techinical support has beren inconsistent, at best.

Thanks again.

Dave

[edited by: jdMorgan at 4:56 pm (utc) on Nov. 9, 2004]
[edit reason] Removed unnecessary URLs per TOS. [/edit]

milstone

8:41 am on Nov 9, 2004 (gmt 0)

10+ Year Member



I did notice that the passwords encrypted by PHPACCESS are much longer than those I did directly on the web sites mentioned above.