.htaccess help

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

.htaccess help

Postby catch22 » Fri 09 Apr, 2004 5:00 pm

I am trying to create a .htaccess and .htpasswd file to protect a folder and the files inside of it on my RCN homepage.

Some background on the site:
The address to my personal webspace is http://users.rcn.com/crazydv8er
My provider uses Apache: Apache/1.3.26 Server at users.rcn.com Port 80

I have a folder on my site labeled "Private" which i would like to have password protected. Inside this folder i have my file ".htaccess" and the contents of that folder are as follows:

AuthName "Password, b#tch!"
AuthType Basic
AuthUserFile /users.rcn.com/crazydv8er/.htpasswd
AuthGroupFile /dev/null

<Limit GET>
require valid-user
</Limit>


Now as listed on the AuthUserFile line, my ".htpasswd" file is in the directory "users.rcn.com/crazydv8er". It reads: "guest:p5KRtSaE3Bzws" without the quotes.

When i attempt to access this folder, i get a login/password prompt as i should, but when i enter my info that i designated in my ".htpasswd" it errors out after 3 attempts. Am i not referencing it correctly? I used a Unix Password Generator from http://www.earthlink.net/cgi-bin/pwgenerator.pl
Please look at the contents of my 2 files and tell me if i am leaving anything out?

Also, is there any way i can make an error page of my own? One that looks similar to a 404 Error page but with my own words?

Please help me anyway possible. My email address is crazydv8er@rcn.com. Thank you.
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
catch22
new member
new member
 
Posts: 1
Joined: Fri 09 Apr, 2004 4:58 pm

Postby profman » Fri 09 Apr, 2004 6:16 pm

This is just a warning that you should not post your E-mail address since people may mis-use it or "harvest" it for spam mail. Its probably also not a good idea to provide the path to your personal files. Please, if you are unable to edit these items yourself, ask me or another moderator to alter these items for your protection.

PS: I hope someone else can answer your question. I know that I can't.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
profman, the mad chemist
Moderator of SillyDog Forums
User of Thunderbird 2.0.0.x & Firefox 3.x
Try Forum Search
User avatar
profman
Moderator
Moderator
 
Posts: 1528
Joined: Wed 11 Sep, 2002 8:00 pm

Postby Antony » Sat 10 Apr, 2004 4:18 am

(Based on Marcus Xenakis' tutorial)
You should have something like following in your .htaccess
Code: Select all
AuthName "Members only"
AuthType Basic
AuthUserFile /home/userdir/password_file
<limit GET POST>
require valid-user
</limit>


You need to check the parameter (Members only) in AuthName to whatever you used in your password group.
the path to your AuthUserFile must be full path, aka (internal path), something like /home/user_name/public_html/subfolder
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1
User avatar
Antony
diamond member
diamond member
 
Posts: 14343
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Postby keith » Mon 12 Apr, 2004 1:45 am

i kind of got lost. is this to put a password on a regular file folder? Ex my documents.

keith.
UserAgent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
KEITH
User avatar
keith
gold member
gold member
 
Posts: 687
Joined: Mon 02 Feb, 2004 11:49 am
Location: Alberta, Canada

Postby Wellander » Mon 12 Apr, 2004 1:47 am

Hi,
It is for a folder on that persons webspace.
That person wants to password protect it.
UserAgent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Wellander
diamond member
diamond member
 
Posts: 2603
Joined: Mon 21 Oct, 2002 6:37 pm


Return to Web Design and Page Coding

Who is online

Registered users: Google [Bot]