I have a website and all the connectivity (with the database and other) are in a folder. Although there is a session on the restricted pages to prevent not logged users, these files may be reached if typed the full url(even if the php does show anything i guess its not a good thing). And the folder itself can be seen like a directory on the server, which is very bad.
www.mysite.com/connectionfolder
How can I deal with this problem? thanks!
Apache: Add the line below in your root
.htaccessfileOptions -IndexesIf there is a line
Options Indexesalready in existing.htaccessfile than you can simply modify it withOptions -IndexesThis will have Apache preventing direct directory access.