[thelist] how do I protect directories outside public_html

Martin Burns martin at easyweb.co.uk
Fri Jun 13 06:24:27 CDT 2008


On 13 Jun 2008, at 10:20, Sales @ Lycosa wrote:

> To protect admin and ini files, I store them above the public_html  
> directory
> in a sibling directory, using mod_rewrite to access them. However, I  
> cannot
> find a satisfactory way of password protecting this directory. I would
> access the safe directory as www.domain.com/safe/ but the actual  
> 'safe'
> directory does not reside within public_html, and the incoming  
> requests are
> redirected using mod_rewrite and a php script. The php script  
> handles the
> redirection of the various file types and does session handling.

Don't use mod_rewrite: use the php script to verify the user  
credentials and then read/output the file or throw an error as  
appropriate.

Cheers
Martin

--
 > Spammers: Send me email -> yumyum at easyweb.co.uk to train my filter
 > http://dspam.nuclearelephant.com/








More information about the thelist mailing list