0

when I am using img tag to show the images, I am using ../images/1.jpg address therefore when users have a look at the source code may easily change the address to /images and see all the pictures. What should I do? or which type of formatting should I use to avoid this, so they do not find the name or actual address of the pictures folder.

 www.example.com/images/1.jpg
4

2 回答 2

1

Turn off directory listings in your httpd.conf, and in your images directory, create a blank file called index.html.

Also, instead of naming your images something guessable, you could concatenate the image id with a secret string and use a hashing algorithm on it.

于 2013-02-10T22:49:01.897 回答
0

如上所述,拒绝目录列表和/或根据参数从 JSP 页面提供目录列表以识别您想要的图像。

于 2013-02-10T22:48:51.787 回答