The only way I found to ensure it, is to split the directory layout. I have a directory that holds a public directory and another secure directory. Then in my Apache config file I set up the directory paths appropriately. Then I also setup if a username/password is required. That can be controlled in the config file or .htaccess file.
Unfortunately your going to have to dig into this. It is not something that can be easily answered without assuming you already know how to setup you webserver.
I have worked with the config files and .htaccess files - so I'm familiar with them - not an expert by any means though! I just wanted to verify if it was possible or not...sounds like it is. Thanks!
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.