I am building a website and I have everything set up and running on my local computer. I have all of the site contents in one directory, and I put all the subfolders and files inside that director. I realize while browsing the site I can capture the url of my images and other resources and then navigate via the browser to the folder containing that resource; which exposes all other resources in that directory( which can also be done by viewing the source code an looking at the directory paths). For example if I click on a image I can get the image location, paste the location in the url, remove the image name from the url - I can see the directory contents. All of the code is done by hand thus far. I was wondering if there is a way to block viewers from viewing directory contents in this manner.
2 replies to this topic
#1
Posted 26 January 2012 - 08:00 AM
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
|
|
|
#2
Posted 31 January 2012 - 02:38 AM
A easy trick is to put an empty index.html in each directory so that shows instead of the directory listing. Another way is to give a directory listing disallowance in the settings in a .htaccess file (if using apache) or similar way
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 31 January 2012 - 10:34 AM
Putting the empty html file works. The apache docs are a bit much for a beginner like myself to grasp all at once, so I'm pretty much picking up bits and pieces here and there. I haven't done any type of server configuration as yet; working with the default settings.
Thank you!
Thank you!
Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused:
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









