Page 1 of 1
Preventing public access to one file
Posted: Thu Sep 18, 2008 4:25 pm
by alex.barylski
I have something like:
Files under 'images' and 'documents' are meant to be publically accessible however index.php should NOT be viewable. How can I password protect that single file while still allowing publica access to files stored in sub-directories relative to it?
Possible?
Re: Preventing public access to one file
Posted: Fri Sep 19, 2008 12:09 am
by Doug G
You could use a wrapper index.php that includes the actual php code from a file that's not in a public directory.
Re: Preventing public access to one file
Posted: Fri Sep 19, 2008 9:46 am
by VladSun
Re: Preventing public access to one file
Posted: Fri Sep 19, 2008 2:41 pm
by alex.barylski
Doug G wrote:You could use a wrapper index.php that includes the actual php code from a file that's not in a public directory.
WOuld need to change the design then...using Apache hacks I could just add to it.
Perfect. Thank you
