Main Page/Stuff/password-protect/htaccess
From phurvitz
< Main Page | Stuff | password-protect
<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>