.htaccess question

  • gman
  • Born
  • Born
  • gman
  • Posts: 1

Post 3+ Months Ago

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
  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 ]

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

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6256
  • Loc: Seattle, WA

Post 3+ Months Ago

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.
  • GDHosting
  • Born
  • Born
  • User avatar
  • Posts: 4

Post 3+ Months Ago

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

  • mikymouse
  • Born
  • Born
  • mikymouse
  • Posts: 3

Post 3+ Months Ago

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
  • Posts: 153
  • Loc: Romania

Post 3+ Months Ago

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 33 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

© 1998-2015. Ozzu® is a registered trademark of Unmelted, LLC.