# how to lock a page?



## medic300

Hey there all, sorry its been some time since I have been on. 
I am working on a site for the fire dept, I am using iwebs (the newest one).

I am looking to lock 2 pages with a password, this password will be shared with the general membership. Does anyone know of any trick on iWebs or any codes to try?


----------



## Laxer

I don't know any tricks with iwebs but it can most certainly be done using some code....

There are a few different languages this can be done in but I think the best would probably be php.

Here is a basic tutorial if your interested: How to Create a Basic Login Script in PHP - wikiHow


----------



## LottieWinde

Hay friend,

Quote from How to Password-Protect Web Pages


> First, create a text file and name it .htpasswd. Enter the usernames and passwords, each on a separate line
> 
> The next step is to create a .htaccess file in the directory you want to protect. If you already have one, add the following text to it. Otherwise, create a new file and enter this text:
> 
> 
> AuthName "Name of Protected Area"
> AuthType Basic
> AuthUserFile /full/path/to/.htpasswd
> Require valid-user


The Two think should need for protect that That is Authname and Autheruserfile


----------

