Limit certain ip to access website with .htaccess

Tuesday, January 16th, 2007

Many friends ask me to limit only certain ip are allow to access their website. To limit specific ip to access website is easy with .htaccess. Just follow the steps below and you will be able to set your website to be view by specific ip:-

Redirect to maintenance page during upgrade using .htaccess

Friday, January 12th, 2007

Redirect your visitor to maintenance page is a must when you are upgrading your site. Now you can redirect your user to maintenance page easily by using .htaccess file. I guess you do not want your visitor to see an error page or 404 page during your server upgrade. So just follow the steps below [...]

Block IP from accessing website using .htaccess

Wednesday, January 10th, 2007

To block certain ip address from accessing your website, just create a file with name .htaccess at your root directory with the content below:-

order allow,deny
deny from 192.168.0.1
allow from all

If you want to block multiple ip address using .htaccess simply add one ip address per line as below:-