Please i need your help with my website (testing stage). I have a file system of this nature...
www (root)
{
school { //main project folder
images //images folder
uploads //user uploads folder
JavaScripts //JS folder
CSS // css folder
includes //includes folder
index.php
contactus.php
aboutus.php
register.php
} //main project folder
} //www folder
how can i prevent users from browsing through my folder system when they do somrthing like these:
http://127.0.0.1/school/css
http://127.0.0.1/school/images
http://127.0.0.1/school/includes
http://127.0.0.1/school/uploads
http://127.0.0.1/school/javascripts
Thnaks for your help....
Create an .htaccess file to the directory you don't want to be navigated via url input..
and inside the file, put this line:
that's all.. enjoy..
and for security purposes use this lines instead:
You could also put an empty php or html file called index.php or index.html in every folder. The users will be unable to browse those directories.
See the following article on how to disable direct directory browsing
Specifically, search for
Options Indexes
in your .htaccess file. If one does not exist, add the following line to your .htaccess:Directory browsing should not be available.
More methods are available at the article above.