.htaccess Protect Your Admin Directory
To do this, create a .htaccess file in your admin directory. Add the following code:
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
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.
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.