Restrict access with .htaccess – Allow IPs range and blocks everything else

Here is some .htaccess example, if you want to allow access to the site only from certain IPs range and block all others:

Order Deny,Allow
Deny from all
Allow from 123.
Allow from 234.123.
Allow from

this .htaccess example will allow acces from IP-range:

  • and

and it blocks everything else!

byrev Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *