only allow few ip address to access website with htaccess

From WebHostingNeeds.com
Jump to: navigation, search

To only access access from IP 59.98.128.0/20

Add following to .htaccess file.

order deny,allow
deny from all
allow from 59.98.128.0/20

Deny Access to Admin area of photopost

<FilesMatch "adm-.*\.php$">
order deny,allow
deny from all
allow from 59.98.128.0/20
</FilesMatch>



htaccess