force download .htaccess
1 AddType application/octet-stream .doc .mov .avi .pdf .xls .mp4
1 AddType application/octet-stream .doc .mov .avi .pdf .xls .mp4
create a .htaccess file with this content.
the .htpasswd contains a user and encrypted password (e.g.: leo:4tHAiRmQ4OpjM). create a encrypted password in: http://www.kxs.net/support/htaccess_pw.html
1 AuthUserFile /home/leonardo/public_html/project/.htpasswd 2 AuthGroupFile /dev/null 3 AuthName "Restricted Access" 4 AuthType Basic 5 <limit GET> 6 require valid-user 7 </limit>
by default, dreamhost runs php as cgi.
the follow line switchs from cgi to apache module execution, supporting php_auth.
1 // create a .htaccess with this: 2 AddHandler application/x-httpd-php .php