HTML Basix - HTML tutorials and online webmaster tools

Htaccess code generators Code generators Tutorials

Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.
Square - receive up to $1000 in payments without any fees - after that, a low 1.9% fee is applied.

Password Protection Code Generator

Password protect folders using htaccess. Users will need to enter their username and password to gain access to the folder.
  • Enter your username
  • Enter your password
  • Enter the full server path to where the htpasswd file will be stored. This is best if it can be stored 'outside' web-accessed areas, such as in a folder alongside your public_html file (or something similar). If this is not possible, then either another folder or the same folder. We just need the full path to where it is!
  • Enter the message you wish to have displayed on the windows box which pops up.
  • Copy the first piece of code and paste it into notepad and save it as htaccess.txt. Upload it in ASCII format to the folder you wish to protect and rename it to .htaccess (remember the dot!!)
  • Copy the second piece of code and paste it into notepad and save it as htpasswd.txt. Upload it in ASCII format to the folder you stated in the path (or the same folder as the .htaccess file) and rename it to .htpasswd (remember the dot!!)
  • Unless you have your ftp program set to show invisible files, the file will then disappear from sight. Don't worry, it's still there!
  • If you have an existing htaccess file, copy and paste the generated code into that.

username and password details
path to password file:
server path, NOT url.
message for popup:


Page will open in a new window

Site Stats     
Total: 9,779,109 Total: 28,358,062
Today: 214 Today: 486
Yesterday: 360 Yesterday: 854
Past Month: 11,160 Past Month: 26,474

341 visitors in the last 24 hours
This page has been visited 225,352 times
There are currently 2 visitors online
click to see where
most people online at once:
286 visitors on 06/27/2012
   You beaut

This site is © HTML Basix 2003 - 2009