Posted By

Orlandoo on 09/19/10


Tagged

htaccess


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

abdulaziz
kubaitis
benediktvaldez


Redirect Everyone Except Specified IPs


 / Published in: Apache
 

If for some reason you would want to deny everyone or allow only a specific group of IP addresses to access your website, add the following code to your .htaccess file:

  1. ErrorDocument 403 http://www.domainname.com
  2. Order deny,allow
  3. Deny from all
  4. Allow from 124.34.48.165
  5. Allow from 102.54.68.123

Report this snippet  

You need to login to post a comment.