<html><!-- #BeginTemplate "/Templates/coolblue-inside.dwt" -->
<head>
<!-- #BeginEditable "doctitle" --> 
<title>Password Protecting Web Pages With .htaccess</title>
<meta name="title" content="Password Protecting Web Pages With .htaccess.">
<meta name="description" content="Use .htaccess to password protect your web pages.">
<meta name="keywords" content="meta tags, search engines, rankings, seo, optimize web pages, web templates, sell web templates, web templates business, online business, internet business, web site design, web design, web designer, beginner, tutorial, getting started, website design, design resources, html help, banners, wanna-be, learn web design, learn website design, beginning web design, website help, domain names, web hosting, javascript, dhtml, graphics links, sound loops, free sounds, sound wavs, site promotion, places to add your url, useful links, free scripts, getting started in website design, add your url, search portal, postcard, guestbook, making money on the internet, affiliate programs, finding a web site sponsor, website sponsor, free web space, free home page, free email, web designer, designing links">
<META NAME="rating" content="general">
<META NAME="distribution" CONTENT="global">
<META NAME="resource-type" CONTENT="document">
<META NAME="last-modified" CONTENT="2006/12/08">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="10_days">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<!-- #EndEditable --> 
<LINK REL=stylesheet HREF="http://www.webmajestic.com/mystyle.css" TYPE="text/css">
</head>
<body bgcolor="#79849A" topmargin="0">
<!-- Kontera ContentLink(TM);--> 
<script type='text/javascript'>
var dc_AdLinkColor = 'green' ;
var dc_UnitID = 14 ;
var dc_PublisherID = 11118;
var dc_adprod = 'ADL' ;
</script>
<script type='text/javascript' 
src='http://kona.kontera.com/javascript/lib/KonaLibInline.js'>
</script>
<!-- Kontera ContentLink(TM) --> 
<table border="0" cellpadding="0" cellspacing="0" width="750" align="center">
  <tr> <!-- Shim row, height 1. --> 
    <td><img src="images/shim.gif" width="750" height="1" border="0"></td>
    <td><img src="images/shim.gif" width="1" height="1" border="0"></td>
  </tr>
  <tr valign="top"> 
    <td bgcolor="#FFFFFF"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
        <tr> 
          <td width="76%" valign="top"> 
            <div align="center"> 
              <table border="0" cellpadding="0" cellspacing="0" width="750">
                <!-- fwtable fwsrc="home2.png" fwbase="index.gif" --> 
                <tr> <!-- Shim row, height 1. --> 
                  <td><img src="images/shim.gif" width="217" height="1" border="0"></td>
                  <td><img src="images/shim.gif" width="533" height="1" border="0"></td>
                  <td><img src="images/shim.gif" width="1" height="1" border="0"></td>
                </tr>
                <tr valign="top"><!-- row 1 --> 
                  <td rowspan="2"><img name="index_r1_c1" src="images/index_r1_c1.gif" width="217" height="263" border="0" usemap="#hoover_index_r1_c1MapMap"><map name="hoover_index_r1_c1MapMap"><area shape="rect" coords="8,9,198,245" href="index.html" alt="Home" title="Home"></map></td>
                  <td><img name="index_r1_c2" src="images/index_r1_c2.gif" width="533" height="230" border="0" usemap="#hoover_index_r1_c1Map"><map name="hoover_index_r1_c1Map"><area shape="rect" coords="447,176,531,213" href="http://www.webmajestic.com/contact.html" alt="Contact Webmajestic" title="Contact Webmajestic"><area shape="rect" coords="349,175,444,213" href="http://www.webmajestic.com/resources.html" alt="Resources" title="Resources"><area shape="rect" coords="3,175,79,214" href="http://www.webmajestic.com/web_lessons.html" alt="Web Design Lessons" title="Web Design Lessons"><area shape="rect" coords="83,176,169,214" href="http://www.webmajestic.com/templates" alt="Web Design Templates" title="Web Design Templates"><area shape="rect" coords="170,177,262,213" href="http://www.webmajestic.com/articles" alt="Web Design Articles" title="Web Design Articles"><area shape="rect" coords="263,177,349,212" href="http://www.webmajestic.com/graphics" alt="Free Web Graphics" title="Free Web Graphics"><area shape="rect" coords="4,4,527,165" href="index.html" alt="Home" title="Home"></map></td>
                  <td><img src="images/shim.gif" width="1" height="230" border="0"></td>
                </tr>
                <tr valign="top"><!-- row 2 --> 
                  <td background="images/index_r2_c2.gif" valign="middle">
                    <div align="right"><!-- Google CSE Search Box Begins --> 
                      <form id="searchbox_001927420258398297637:nplqsaxspt4" action="http://www.webmajestic.com/results.html">
                        <input type="hidden" name="cx" value="001927420258398297637:nplqsaxspt4" />
                        <input name="q" type="text" size="30" value=" " />
                        <input style="background:CCCCCC; border-width:1px" type="submit" name="sa" value="Search" />
                        <input type="hidden" name="cof" value="FORID:11" />
                      </form>
                      <script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_001927420258398297637%3Anplqsaxspt4"></script>
                      <!-- Google CSE Search Box Ends --></div>
                  </td>
                  <td><img src="images/shim.gif" width="1" height="33" border="0"></td>
                </tr>
              </table>
              
              
            </div>
            <!-- #BeginEditable "content" --> 
            <center>
              <div align="center"></div>
              <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" height="478">
                <tr valign="top"> 
                  <td> 
                    <div align="center"> 
                      <h1 align="left"></h1>
                      <h1 align="center"><b>Htacess Password Protection</b></h1>
                      <table width="100" border="0" cellspacing="0" cellpadding="2" align="left">
                        <tr> 
                          <td><font face="Arial, Helvetica, sans-serif" size="2"> 
                            <script type="text/javascript"><!--
google_ad_client = "pub-3142337522589164";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text";
//2006-12-07: webmajestic
google_ad_channel = "6999496151";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0033FF";
google_color_text = "000000";
google_color_url = "0033FF";
//--></script>
                            <script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
                            </font></td>
                        </tr>
                      </table>
                      <p align="left">The following gives you instruction on how 
                        to password protect your website directory with .htaccess.</p>
                      <p align="left"><br>
                        There are three simple files involved: .htaccess, .htgroup 
                        and .htpasswd all you have to do is make them and ftp 
                        them up to your webserver. You put the .htaccess in the 
                        directory that you want to protect the other two files 
                        go in a directory not visible to anyone but you, get the 
                        path right or nothing will work. If your ftp login is 
                        elvis the path of your directory looks like this: /home/elvis/www/index.html. 
                        Make sure you use an ordinary text editor like windows 
                        notepad or simple text for the Mac. </p>
                      <p align="left"><b>Step 1</b>: <b>MAKE A .htaccess FILE 
                        </b> </p>
                      <p align="left">It should look like this. The first two 
                        lines tell where .htpasswd and .htgroup are located and 
                        the third line is the title that will be in the password 
                        box that pops up to prompt users for their login, user-list 
                        is just the name of the group that has access its just 
                        a generic term. </p>
                      <p align="left">AuthUserFile /home/elvis/.htpasswd <br>
                        AuthGroupFile /home/elvis/.htgroup <br>
                        AuthName Graceland_Visitors <br>
                        AuthType Basic </p>
                      <p align="left">&lt;Limit GET&gt; </p>
                      <p align="left">require group user-list </p>
                      <p align="left">&lt;/Limit&gt;<br>
                      </p>
                      <p align="left">Save this file, call it .htaccess and then 
                        ftp it up to the directory that you want to protect. </p>
                      <p align="left"><b>Step 2</b>: <b>MAKE A .htgroup FILE</b> 
                      </p>
                      <p align="left">This file tells who is in the group &quot;user-list&quot; 
                        the syntax is simple user-list: with a space between each 
                        of the user's names. </p>
                      <p align="left">user-list: john joe dick harry jane spot 
                        ryan manos<br>
                        elvis<br>
                      </p>
                      <p align="left">Save this file, call it .htgroup and ftp 
                        it up to the /home/elvis directory. </p>
                      <p align="left"><b>Step 3</b>: <b>MAKE A .htpasswd FILE 
                        </b></p>
                      <p align="left">All of the passwords are encrypted so you 
                        have to use a program called htpasswd to generate them. 
                        There are two ways to do this, one if you have a shell 
                        and know how to use it your can telnet to inch.com, login 
                        and do the deed from your shell account by typing: htpasswd 
                        -c .htpasswd username to create the file and add &quot;username&quot; 
                        as the first user. The program will prompt you for a password, 
                        then verify by asking again. You will not see the password 
                        when entering it here but it will appear in this syntax 
                        in the .htpasswd file and your will not have to use the 
                        -c flag when writing subsequent passwords since that creates 
                        the file .htpasswd, you can now ftp it up to the /home/elvis 
                        directory. </p>
                      <p align="left">If all this was gibberish to you proceed 
                        directly to STEP 4.</p>
                      <p align="left">john:aRrw1zmSpdF9A <br>
                        joe:xz/mhQzOO8.XI <br>
                        dick:c0slBI3MevFaU <br>
                        harry:KH8j2fHBVgFRU <br>
                        jane:NfCH.9wsNc78I <br>
                        spot:cQc9EGC.gD1Og <br>
                        ryan:itlv3jZYGvj7s <br>
                        manos:jEYnEJ3lX3j0Y elvis:MpU4S/Lvr8KlE </p>
                      <p align="left"><b>Step 4</b>: <b>GENERATE YOUR PASSWORDS 
                        </b> </p>
                      <p align="left">Do it the easy way using the <b>Inch Password 
                        Generator</b>. Go to the password generator page and use 
                        it to make as many passwords as you need then cut and 
                        paste them into a text file. 
                        <script>

//Popup Window Script
//By Website Abstraction (http://wsabstract.com)
//JavaScript tutorials and over 400+ free scripts

function openpopup(){
var popurl="http://webinfo.inch.com/server/apache/htpasswd.html"
winpops=window.open(popurl,"","width=400,height=500,status,menubar,")
}

</script>
                        <a href="javascript:openpopup()">GO NOW</a> </p>
                      <p align="left">After you've finished cutting and pasting 
                        your file should look something like the file you see 
                        above. Now ftp it up to the /home/elvis directory where 
                        your .htgroup file is located. Now you can give it a try. 
                        Go to the URL of the directory and this window should 
                        pop up: </p>
                      <p align="left"> Now if everything was done correctly then 
                        you should be immediately authenticated and allowed to 
                        enter the site. If it refuses you, you probably made a 
                        mistake, most likely in the path to the .htpasswd and 
                        .htgroup file in your .htaccess file. <br>
                      </p>
                      If you want to remove a user then simply use the text editor 
                      you assembled your .ht.passwd file with to remove that user 
                      and his password.-</div>
                  </td>
                </tr>
              </table>
              </center>
            <!-- #EndEditable --> 
            <div align="center"> </div>
            <div align="right"></div>
          </td>
        </tr>
      </table>
    </td>
    <td>&nbsp;</td>
  </tr>
  <tr valign="top"><!-- row 3 --> 
    <td background="images/hoover_index_r3_c1.gif" valign="middle"> 
      <div align="center"><a href="http://www.webmajestic.com">Home</a> | <a href="http://www.webmajestic.com/webguide.html">Tutorials</a> 
        | <a href="http://www.webmajestic.com/userpages">Free Site Builder</a> 
        | <a href="http://www.webmajestic.com/templates">Templates</a> | <a href="http://www.webmajestic.com/articles">Articles</a> 
        | <a href="http://www.webmajestic.com/graphics">Free Web Graphics</a> 
        | <a href="http://www.webmajestic.com/awardsprogram.html"> </a> <a href="http://www.webmajestic.com/resources.html">Web 
        Resources</a> | <a href="http://www.webmajestic.com/links.html">Links</a> 
        | <a href="http://www.webmajestic.com/privacy.html">Privacy</a> | <a href="http://www.webmajestic.com/contact.html">Contact</a></div>
    </td>
    <td><img src="images/shim.gif" width="1" height="34" border="0"></td>
  </tr>
</table>
<div align="center"><font color="#CC6600"><font color="#FFFFFF"> © 2000-2008 <a href="http://www.webmajestic.com">Webmajestic.com</a>. 
  All Rights Reserved</font></font><font color="#FFFFFF">.</font> </div>
</body>

<!-- #EndTemplate --></html>