Redirect Everyone Except Specified IPs

/ Published in: Apache
Save to your folder(s)

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:

Copy this code and paste it in your HTML
  1. ErrorDocument 403
  2. Order deny,allow
  3. Deny from all
  4. Allow from
  5. Allow from

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.