.htaccess question

  • gman
  • Born
  • Born
  • No Avatar
  • Joined: Jun 30, 2008
  • Posts: 1
  • Status: Offline

Post June 30th, 2008, 7:13 pm

Hi all,

I made a company website http://www.astrotoolco.com using web page maker--an online software. Now I would like to add password to the site. I found a .htaccess generator which generated the following code:

Code: [ Select ]
AuthUserFile http://astrotoolco.com/index.html/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic

<limit GET POST>
require valid-user
</limit>
  1. AuthUserFile http://astrotoolco.com/index.html/.htpasswd
  2. AuthGroupFile /dev/null
  3. AuthName "Password Protected Area"
  4. AuthType Basic
  5. <limit GET POST>
  6. require valid-user
  7. </limit>


Code: [ Select ]
guest:guE/.mlvd58eU


I added this to the header of my website--with no success--can someone tell me what I am doing wrong
Godaddy.com is hosting the website

many thanks in advance

Gary
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 30th, 2008, 7:13 pm

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6134
  • Loc: Seattle, WA
  • Status: Offline

Post June 30th, 2008, 7:46 pm

You need to place that in a file named ".htaccess" in the directory that you want to be password-protected. It does not go in the header of a web page.
The Beer Monocle. Classy.
  • GDHosting
  • Born
  • Born
  • User avatar
  • Joined: Jul 30, 2007
  • Posts: 4
  • Status: Offline

Post July 7th, 2008, 5:27 pm

Hi Gary,

I hope you have this resolved already! If not, then you can use the following article for more details on creating an .htaccess file to password protect.
Using .htpasswd With Your Linux Shared Hosting Account

We also offer password protection in the File Manager located in the Hosting Control Center. This feature is basically the same thing, just automated.
Password Protecting a Directory in Your Shared Hosting Account

Regards,
  • mikymouse
  • Born
  • Born
  • No Avatar
  • Joined: Jul 20, 2008
  • Posts: 3
  • Status: Offline

Post July 20th, 2008, 5:58 am

Create a file .htaccess on server, in the directory that you wat to be protected, and copy into this file

AuthUserFile path/to/the/password_file/.htpasswd
AuthName "Message"
AuthType Basic
require valid-user

Using program htpasswd.exe, from apache, you can generate the password file .htpasswd
You can find , htpasswd.exe , in the Bin directory from Apache.

Example to use :

htpasswd -c .htpasswd user_name

After you press Enter, the program wait to type the password.

If you want to add moore user's , use the program in this way:

htpasswd .htpasswd user_name

Option -c, is used just first time to create the file .htaccess.

Best regards,
  • seularts
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jan 02, 2007
  • Posts: 147
  • Loc: Romania
  • Status: Offline

Post July 20th, 2008, 3:04 pm

http://astrotoolco.com/index.html/.htpasswd this is not the path to ypur file.., you have to go to the root of your server.. the path shoud look something like this c:/folder/your_site_folder_name/.htpassd and one more thing you can't put a file slashed after another file.. in your case index.html/.htpasswd it should have been in a normal case http://astrotoolco.com/.htpasswd, just a thought!:)

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 68 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.