If you want to secure a path on your website for access from a specific IP  only, this is how to define your .htaccess

Assuming your IP is 123.45.67.89

order deny,allow
allow from 123.45.67.89
deny from all

If you want to allow a range of IPs… you can enter a mask

Assuming your IP is 123.45.67.89
and need following three IP as well
Assuming your IP is 123.45.67.90
Assuming your IP is 123.45.67.91
Assuming your IP is 123.45.67.92

order deny,allow
allow from 123.45.67.89/29 
deny from all

Or

order deny,allow
allow from 123.45.67.89/255.255.255.248
deny from all

Or for a more easy to understand approach

order deny,allow
allow from 123.45.67.89
allow from 123.45.67.90
allow from 123.45.67.91
allow from 123.45.67.92
deny from all
Spread the love