<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">With the great assistance I got here I was able to get .htaccess to work on a centos 5.1 box running Apache 2.2.3 a few days ago.</SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN> </P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"> One other question.  I am trying to protect a sub dir within the web space of a domain that is serving site statistics of awstats generated pages.<SPAN style="mso-spacerun: yes">  </SPAN>The path to the dir is /home/user1/www/awstats.<SPAN style="mso-spacerun: yes">  </SPAN>When testing, I am able to get a username and password prompt for the front page of the site, i.e. for <A href="http://www.mydomain.com/"><U><FONT color=#0000ff>www.mydomain.com</FONT></U></A>, when I place the .htaccess file in www, but I can’t get a prompt for <A href="http://www.mydomain.com/awstats"><U><FONT color=#0000ff>www.mydomain.com/awstats</FONT></U></A> when I place the .htaccess in awstats.<SPAN style="mso-spacerun: yes">  </SPAN></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"><SPAN style="mso-spacerun: yes"></SPAN><o:p></o:p></SPAN> </P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">I am using the below script alias in the virtual domain conf.d file for this site the awstats directory is located in, so that awstats can generate the log file stats and alias them to the awstats dir which is empty:<o:p></o:p></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/</SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"><o:p></o:p></SPAN> </P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">I’m assuming that’s why I can’t get a login prompt – any suggestions as to how to protect the awstats dir with .htaccess for a script alias’ed directory?<o:p></o:p></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">The .htaccess file which I was using and works fine for the main www dir is:</SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"><o:p></o:p></SPAN> </P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">AuthName “/www”<o:p></o:p></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">AuthType Basic<o:p></o:p></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">AuthUserFile /home/user1/.htpasswd<o:p></o:p></SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana">Require user guest</SPAN></P>
<P style="BACKGROUND: white"><SPAN style="FONT-SIZE: 8.5pt; COLOR: #444444; FONT-FAMILY: Verdana"></SPAN> </P>

<P> <BR></P><br /><hr />In a rush? <a href='http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008' target='_new'>Get real-time answers with Windows Live Messenger.</a></body>
</html>