You are currently browsing the page Password protection in the Miscellaneous category.

Password protection

If you need to protect your site or a part of your site with a password, here are the codes... You'll need to make a new file named .htaccess, the file's name must be exactly .htaccess! Nothing else. Well, so open notepad, and paste this:

PerlSetVar AuthFile 6541.txt
AuthName "PASSWORD REQUIRED"
AuthType Basic
require valid-user

Save as .htaccess or paste it in your current htaccess file. "PASSWORD REQUIRED" is the message shown when someone tries to access the page. The "6541.txt" in bold is the name of the file containing your password and username. I advise you to name it with a name or numbers nobody can find... If it isn't in the same folder as your htaccess file, you can add folder/6541.txt Well, then, open a new blank document, and put your username and password like this:

USERNAME:PASSWORD

Save it as 6541.txt !

Print This Post Print This Post



Sponsors


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It