Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Something similar, but cleaner
#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


Messages In This Thread
Something similar, but cleaner - by Miku - 09-24-2011, 05:30 PM
RE: Something similar, but cleaner - by -1337 - 09-25-2011, 09:57 AM
RE: Something similar, but cleaner - by Miku - 09-25-2011, 11:49 AM
RE: Something similar, but cleaner - by TalishHF - 11-16-2011, 06:42 AM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)