Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.
Moderator: General Moderators
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Thu Sep 18, 2008 4:25 pm
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?
Doug G
Forum Contributor
Posts: 282 Joined: Sun Sep 09, 2007 6:27 pm
Post
by Doug G » Fri Sep 19, 2008 12:09 am
You could use a wrapper index.php that includes the actual php code from a file that's not in a public directory.
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Fri Sep 19, 2008 9:46 am
There are 10 types of people in this world, those who understand binary and those who don't
alex.barylski
DevNet Evangelist
Posts: 6267 Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg
Post
by alex.barylski » Fri Sep 19, 2008 2:41 pm
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