Difference between revisions of "Main Page/Stuff/password-protect/htaccess"

From phurvitz
Jump to: navigation, search
(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 ...)
 
 
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">

  1. !/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>