I am trying to secure a directory by IP address. I need to access the directory from my ip address (through the browser) and no one else. But I also need to access it via cron (cli). I also have scripts in there that are used by all web visitors via ajax…
I did have a htaccess rule on the directory like so:
order deny,allow deny from all allow from 127.0.0.1 allow from 192.168.0. allow from 123.456.789.123 etc..
That works almost perfectly apart from the ajax calls receive a 403.
Is there a way I can secure the directory but also have the access that I and my web users need?