I have added
Order Deny,Allow
Deny from all
allow from *my ip*
to my htaccess file but now when I use a function like getimagesize, I get an error while trying to retrieve the data from a local file on the server.
Error: [function.getimagesize]: failed to open stream: Redirection limit reached
When I remove the lines in htaccess it works. I also tried adding "allow from localhost" and "allow from 127.0.0.1" but no avail.