English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is it possible to creat a password and login before viewing the home page?

2007-07-24 01:49:49 · 4 answers · asked by Anonymous in Computers & Internet Other - Computers

4 answers

you can password protect http://www.terapad.com , maybe that helps?

2007-07-26 08:21:20 · answer #1 · answered by Anonymous · 0 0

yes it is possible

Although there are many uses of the .htaccess file, by far the most popular, and probably most useful, is being able to relaibly password protect directories on websites. Although JavaScript etc. can also be used to do this, only .htaccess has total security (as someone must know the password to get into the directory, there are no 'back doors')

The .htaccess File

Adding password protection to a directory using .htaccess takes two stages. The first part is to add the appropriate lines to your .htaccess file in the directory you would like to protect. Everything below this directory will be password protected:

AuthName "Section Name"
AuthType Basic
AuthUserFile /full/path/to/.htpasswd
Require valid-user

There are a few parts of this which you will need to change for your site. You should replace "Section Name" with the name of the part of the site you are protecting e.g. "Members Area".

The /full/parth/to/.htpasswd should be changed to reflect the full server path to the .htpasswd file (more on this later). If you do not know what the full path to your webspace is, contact your system administrator for details.

The .htpasswd File

Password protecting a directory takes a little more work than any of the other .htaccess functions because you must also create a file to contain the usernames and passwords which are allowed to access the site. These should be placed in a file which (by default) should be called .htpasswd. Like the .htaccess file, this is a file with no name and an 8 letter extension. This can be placed anywhere within you website (as the passwords are encrypted) but it is advisable to store it outside the web root so that it is impossible to access it from the web.

Entering Usernames And Passwords

Once you have created your .htpasswd file (you can do this in a standard text editor) you must enter the usernames and passwords to access the site. They should be entered as follows:

username:password

where the password is the encrypted format of the password. To encrypt the password you will either need to use one of the premade scripts available on the web or write your own. There is a good username/password service at the KxS site which will allow you to enter the user name and password and will output it in the correct format.

For multiple users, just add extra lines to your .htpasswd file in the same format as the first. There are even scripts available for free which will manage the .htpasswd file and will allow automatic adding/removing of users etc.

Accessing The Site

When you try to access a site which has been protected by .htaccess your browser will pop up a standard username/password dialog box. If you don't like this, there are certain scripts available which allow you to embed a username/password box in a website to do the authentication. You can also send the username and password (unencrypted) in the URL as follows:

http://username:password@www.website.com/directory/

2007-07-24 01:56:40 · answer #2 · answered by Govinda 2 · 0 0

You can require a user name and password to limit access to the entire site. Actually the home page is the user name and password page.

You can also subdivide a web site into 2 parts. One part is for the general public; the other part is restricted.

2007-07-24 01:55:54 · answer #3 · answered by GTB 7 · 0 0

Try http://www.webstarts.com Signup for FREE

Its very easy to use drag and drop web editor that let's you make changes to your site when and where you want. Painless step by step process that will have your site up and running fast. Short turn around times on custom websites and artwork.

Checkout the gallery of Websites Created With The Webstarts Editor http://webstarts.com/gallery-hr.php

2007-07-25 03:04:10 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers