Main Page/Stuff/password-protect/htaccess
From phurvitz
< Main Page | Stuff | password-protect
Revision as of 21:03, 1 February 2010 by Phil Hurvitz (talk | contribs)
<source lang="bash">
- !/bin/sh
if [ -f ./.htaccess ] then
rm ./.htaccess
fi touch ./.htaccess dir=`pwd` echo $dir echo "AuthUserFile $dir/.htpasswd" >> ./.htaccess echo "AuthName Here" >> ./.htaccess echo "AuthType Basic" >> ./.htaccess echo "<Limit GET>" >> ./.htaccess echo "require valid-user" >> ./.htaccess echo "</Limit>" >> ./.htaccess </source>