Difference between revisions of "Main Page/Stuff/password-protect/htaccess"
From phurvitz
< Main Page | Stuff | password-protect
Phil Hurvitz (talk | contribs) (New page: #!/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 ...) |
Phil Hurvitz (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | <source lang="bash"> | ||
#!/bin/sh | #!/bin/sh | ||
if [ -f ./.htaccess ] | if [ -f ./.htaccess ] | ||
Line 13: | Line 14: | ||
echo "require valid-user" >> ./.htaccess | echo "require valid-user" >> ./.htaccess | ||
echo "</Limit>" >> ./.htaccess | echo "</Limit>" >> ./.htaccess | ||
+ | </source> |
Latest revision as of 21:03, 1 February 2010
<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>