Return to Homepage ...
Domain Name Search
    
Need Live Assistance? Click Here ...

Site Secured by Thawte
 Home > Support Center > Password Protection
.
.
Company Information Contact Us Support Documentation Order Hosting Now ... Click Here!
SUPPORT TOPICS


Password Protecting Directories
Control Panel Directory Protection Tool
Overview
 
You can "Password Protect" directories or sub-directories on your site via the icon located in your control panel. Visitors would require a username and password in order to access those areas, once completed. Password protecting parts of your site is an easy way to make your own "Member's Only" pages and areas.

Method

Select the directory you want to work on in the pull-down list from the "Protect Directory" icon located in your control panel. Add individual usernames (or groups) and individual passwords (or global) to restrict access to specific areas of your site.
Customizing the .htaccess file

 .htaccess is used to password protect a directory

PASSWORD PROTECTING WITH HTACCESS

What is '.htaccess'?

NOTE: Do NOT edit the '.htaccess' file if you are using MS FrontPage! FrontPage uses the '.htaccess' file, and editing it may cause errors in your configuration.

Also, modifying the .htaccess file is recommended for "advanced users only". Filter settings must be enabled on your ftp client to view these hidden files.

First you want to create a '.htaccess' file in the directory that you want to protect.  Moreover, the '.htaccess' file can be placed in one or more of your /home/username/your_domain-www sub-directories Among other things, this file can be used to restrict access to other files and web pages.

When a request for a web page is made, the web server first checks for an '.htaccess' file. The server begins this check by looking for '.htaccess' in the root of the current web directory, and on down the directory tree until it reaches the the directory where the requested file resides. Since the placement of the '.htaccess' file determines when it is executed, this fact can be used to restrict access only in certain sub-directories

Restricting Access: Password Protection

The directory you want protected must have an '.htaccess' file in it that looks like the following:

AuthUserFile /home/username/.passwd
AuthGroupFile /home/username/.group
AuthName "Access by password Only"
AuthType Basic
<Limit GET POST>
require group groupname
require user username
</Limit>

Groups and users are stored in the '.group' file, and passwords are stored in '.passwd'. The '.htaccess' file looks for these files in the /home/username/ directory. Do not attempt to edit these manually! Atlanta Virtual has a special script you can use to manage your '.group' and '.passwd' files (the "Webmister" script).

Redirects

Redirecting allows you to send the user to, for example, 'new.html' when they attempt to access 'old.html'. To see this example in practice, simply add the following line (This should be typed as one single line without breaks) to the '.htaccess' file:

Redirect /directory_name/old.html
http://your_domain.com/directory_name/new.html

Apache has a nice FAQ on redirects.

 
. Copyright © 1997 AtlantaVirtual.com, Inc. | All Rights Reserved

Secured by Thawte