Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Something similar, but cleaner
#1
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?
Reply
#2
.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.
Reply
#3
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.
Reply
#4
This sounds cool intel pm me if you manage to complete it!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it smart to make a similar website niche to someone else? Chelloa 22 5,380 01-08-2012, 08:39 AM
Last Post: AceInfinity

Forum Jump:


Users browsing this thread: 1 Guest(s)