Your Store Name, change in catalog/includes/languages/ your language
Home Products Forums Gallery
Home » Apache » Setting up an .htaccess Protected Directory Log In  |   Cart Contents   |   Checkout  |  
Categories
Manufacturers
Reviews more
There are currently no product reviews
Articles
Apache (1)
E-Commerce (1)
Web Design (1)
Links and Content more
Client Showcase

osCommerce
CRELoaded
phpBB
Developer Resources
Discussion Board
Re: SUPPORT: Default Attributes Sort Order AddOn for CRE Loaded

Re: SUPPORT: Default Attributes Sort Order AddOn for CRE Loaded

SUPPORT: Default Attributes Sort Order AddOn for CRE Loaded

Re: Board Preferences - General Error

Board Preferences - General Error

Affiliate Info
Affiliate Information
Affiliate Log In
Setting up an .htaccess Protected Directory by Steve

Installing the .htaccess involves a few steps. The most important thing is to make sure you do not install the .htaccess file in your main web directory. If you do, everyone will be locked out of your website. Unless this is what you want to do, make sure you create the directory and are located in it before creating the file.

Step 1: See where you are. At your prompt enter the command pwd to see what directory you are in. If you have already made your new directory and are in it - go on to Step 3.

Step 2: issue the command mkdir dirname where dirname is what you want to call the directory you will be protecting. Then enter the command cd dirname

Step 3: Using an editor such as EditPad Light or Notepad, create a file called .htaccess (lower case letters of course, with the leading period)* that looks just like this:

AuthUserFile /usr/www/dirname/.htpasswd
AuthGroupFile /dev/null
AuthName "The Secret Page"
AuthType Basic


require valid-user


Step 4: Change the AuthUserFile so that the UNIX PATH matches that of your system. This is where the password file that we will create in a moment will reside.

Step 5: Change The Secret Page to be whatever title you want to have appear on the password box.

Step 6: To create the password file, issue the following command: (NOTE: you only do it this way to create a new file)

htpasswd -c .htpasswd user_name (where user_name is a name)

If you get a message like, htpasswd: not found enter the command type htpasswd. If that doesn't do the trick, try which httpd. If htpasswd is not in your path, you will have to add that directory to your path or enter the command as /what/ever/dir/htpasswd -c user_name

Step 7: The system will ask you to enter the password for this user. It will then ask you a second time to confirm your typing.

Step 8: Continue to add new users, but with this version of the command. The -c option is only for the initial creation of the file.

htpasswd .htpasswd new_name

That is all there is to it!

Note: If you experience any problems with the file, you should seek support from your hosting company ;-)

(*Note: If you create the file on your local computer, you may have to create the file with a name like temp.htaccess, upload that file to your web server and then rename it so that the "temp" part is removed from the file name.)

This article was published on Thursday April 03, 2008.
Current Reviews: 0
Write Review
Tell a friend
Tell a friend about this article:  
Site Secured by
Shopping Cart more
0 items
Your Account
Your Email Address
Your Password
Information
Privacy Statement
Gift Voucher FAQ
Links
Contact Us
Faq
How to Order
We Accept
We Accept Visa, MasterCard, American Express and Discover for payment.
We Accept Visa, MasterCard, American Express and Discover for payment.
Advertisement
Public Service Message
NCMEC: Florida's Missing Kids
Donate
| Home | Products | FAQ | Forums | Gallery | Contact Us |  Top


Click here to see these designs now!

Copyright © 2010  , All Rights Reserved.
This site powered by osCommerce - Phoenix Extended Edition v1.5.1 - Site Design by NewSite Designs