[thelist] Preventing direct access while allowing PHP script access

Richard Bennett richard.bennett at skynet.be
Mon Mar 27 06:59:51 CST 2006

On Monday 27 March 2006 13:10, minty freshness wrote:
> I would've thought this would be quite a common desire, but I can't
> seem to find any ideas on how to achieve it. Plenty of examples of how
> to prevent "hotlinking", but evidently while this also concerns me,
> it's HTTP requests from my *own* domain that's the worry at the
> moment!

Hi there,
it is quite simple really, if you're hosting on an apache webserver you put up 
an .htaccess file that only allows access from localhost to those files.
it looks like this:

deny from all
allow from
allow from localhost


More information about the thelist mailing list