A Simple approach for a password protect folder called /private
Open notepad and start typing… (When ready to save make sure the ext .txt is not there)
File: .htaccess
AuthUserFile /home/content/u/s/e/username/html/private/.htpasswd AuthGroupFile /dev/null AuthName "Secure Directory" AuthType Basic <limit GET POST> require valid-user </limit>
Now for the password file… (use www.webmaster-toolkit.com to generate password)
File: .htpasswd
username:someCrytedPassword
When done, upload both files to the directory /private
NOTE:
Now, if life we’re I could say, “that’s it” but it’s not and here we go with godaddy’s problem of cgi wrapping. At the moment Godaddy will not understand to “restrict” a folder using .htaccess unless the index file is either “index.html” or “index.htm” - anything like “index.php” will open “un-restrict” the folder to the public.


0 Responses to “Setting up .htaccess and .htpasswd (Godaddy Hosted)”