I have the following structure for my filesystem
public_html css/ doc/ img/ js/ lib/ *.php private_html miscellaneous/
The document root in for my website is set in
Currently this allows users to direct access to files from the url like
What is the best way to prevent direct access to these files? Should I just restructure the filesystem like this:
public_html *.php private_html css/ doc/ img/ js/ lib/ miscellaneous/
And update the paths of the included scripts in the php files?