Support Forums

Full Version: Something similar, but cleaner
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I saw this tutorial on how to make a simple password protection.
http://www.pagetutor.com/keeper/index.html
It uses Javascript. It pops up a new windows to enter password. Is there a way (using any language, but keep it simple) I can make it so it uses "input" instead of that ulgy thing?
.htaccess Protect Your Admin Directory

To do this, create a .htaccess file in your admin directory. Add the following code:
Quote:RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^12\.345\.678\.9
RewriteRule .* http://www.yoursite.com [R=301,L]


Change the green to your IP address (using the format specified), and the red to the domain you wish to redirect other people.

If you have multiple administrators, use the following code instead:

ErrorDocument 403
Quote:http://www.yoursite.com
Order deny,allow
Deny from all
Allow from 12.34.56.789
Allow from 998.76.54.321

Change the green to each of the IP addresses, and the red to the domain you wish to redirect other people.

That is better than password protection unless you have a dynamic IP address...

To password protect:


If you use cPanel, go to 'Password Protect Directories' under Security. Then, click on the icons to open up directories until you find the admin directory. Then, click on it.

You will be given the option to set up individual user accounts, which might be a good idea to be able to manage who gets access and who doesn't.

If an administrator on your board who had access gets fired, quits, or retires, I suggest you change the password. For this reason I prefer the cPanel method of different users, because you can then simply delete their access privileges.
Not this. What I want is a very simple password protect. When people get into my site, they need to type in a password to get into the home page.
This sounds cool intel pm me if you manage to complete it!