Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Software Development
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: Need help with .htaccess

Reply  
Thread Tools
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
30-Sep-2006, 04:17 PM #1
Solved: Need help with .htaccess
I'm coding a website to protect one folder in it by using .htaccess and .htpasswd. The folder contains one file (webpage) and the .htaccess file.

This is my first time to use .htaccess. I'm pretty sure I coded everything right, but I still cannot get past the password panel to the webpage even after entering my UID/PW.

I think I've exhausted my own expertise and knowledge, and I need help.

I'm using Windows XP Professional with a Compac PC. My website is on the Godaddy.com system, and they assured me that they allow .htaccess programming. I am FTPing with the Windows XP Professional file transfer protocol.

This is my code:

for .htaccess:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /www.rhs71.org/images/.htpasswd
AuthGroupFile /dev/null
require valid-user

for .tpasswd:
classmate:Z.fVj8yLsACHg
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
30-Sep-2006, 04:22 PM #2
Quote:
Originally Posted by JerryBrown
I'm coding a website to protect one folder in it by using .htaccess and .htpasswd. The folder contains one file (webpage) and the .htaccess file.

This is my first time to use .htaccess. I'm pretty sure I coded everything right, but I still cannot get past the password panel to the webpage even after entering my UID/PW.

I think I've exhausted my own expertise and knowledge, and I need help.

I'm using Windows XP Professional with a Compac PC. My website is on the Godaddy.com system, and they assured me that they allow .htaccess programming. I am FTPing with the Windows XP Professional file transfer protocol.

This is my code:

for .htaccess:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /www.rhs71.org/images/.htpasswd
AuthGroupFile /dev/null
require valid-user

for .tpasswd:
classmate:Z.fVj8yLsACHg
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
30-Sep-2006, 04:22 PM #3
I also used Windows Notepad to create the .htaccess and htpasswd files.
thecoalman's Avatar
Computer Specs
Distinguished Member with 2,503 posts.
 
Join Date: Mar 2006
Location: Pennsylvania
Experience: What's the shiny red button for? <click>
30-Sep-2006, 05:26 PM #4
Quote:
Originally Posted by JerryBrown

for .tpasswd:
classmate:Z.fVj8yLsACHg
That file has to be named .htpasswd or is that a typo?
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
30-Sep-2006, 05:55 PM #5
It was a typo
The file name is .htpasswd
I mistyped it and said .tpasswd
Sorry... The problem still exists; I hope you know something about it.
thecoalman's Avatar
Computer Specs
Distinguished Member with 2,503 posts.
 
Join Date: Mar 2006
Location: Pennsylvania
Experience: What's the shiny red button for? <click>
30-Sep-2006, 06:55 PM #6
Having a quick look at one of the folders I have password protected the htaccess file generated through the control panel has the server path. You have

Quote:
AuthUserFile /www.rhs71.org/images/.htpasswd
On mine it's the absolute path for the server. EX:

Quote:
AuthUserFile home/username/public_html/password-protected-folder/.htpasswd
Here's the full contents of my htaccess file:

Code:
AuthUserFile home/username/public_html/password-protected-folder/.htpasswd
AuthName "Protected Area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
30-Sep-2006, 07:20 PM #7
Yep, you need to use the absolute path on the server. Not your domain name.
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
30-Sep-2006, 07:23 PM #8
I'm on the trail, but need help
Thecoalman,
The Help Desk Tech tells the user: "You're too stupid to own a PC." I hope that's not this case (but am afraid I might be). Please walk me through it.

Thanks for your last post. Of all the tutorials I've read and every "easy" step-by-step processes I went through, not one of them explained the matter you referred to.

You said, "one of the folders I have password protected the htaccess file generated through the control panel has the server path." One of the tutorials told me to create the htaccess and htpasswd files with Notepad, not through a control panel generated whatever.

I know what the Control Panel is. I press START at the lower left of my screen and then click on Control Panel. But where in the world do I do go create a control-panel htaccess file?

Another thing that blows my mind is the "server path." This htpasswd file is going to reside on the website, not on my PC. How do I find or define the server path of a website?

Do they have an icon for "too ignorant to live"?
thecoalman's Avatar
Computer Specs
Distinguished Member with 2,503 posts.
 
Join Date: Mar 2006
Location: Pennsylvania
Experience: What's the shiny red button for? <click>
30-Sep-2006, 10:36 PM #9
Quote:
Originally Posted by JerryBrown
You said, "one of the folders I have password protected the htaccess file generated through the control panel has the server path." One of the tutorials told me to create the htaccess and htpasswd files with Notepad, not through a control panel generated whatever.
Sorry for the confusion, I'm referring to my hosting control panel, not windows control panel. Many hosts provide one where you can do basic stuff like generate htaccess files. Using the control panel or notepad will not make a difference as long as you have it correct.

Quote:
Another thing that blows my mind is the "server path." This htpasswd file is going to reside on the website, not on my PC. How do I find or define the server path of a website?
For that you would have to consult your host.
JerryBrown's Avatar
Computer Specs
Junior Member with 10 posts.
 
Join Date: Sep 2006
Location: Burbank, California
Experience: Intermediate
01-Oct-2006, 12:13 PM #10
That did it - Thanks
Thanks, Thecoalman. That information was what I needed. I appreciate your helping me like that...

...now take a look at my next question
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:22 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.