
In url localhost/newproject/app/webroot/admin/ all images are directly viewable in form of listings. Images should be accessible in webpage but not directly through folder.

In url localhost/newproject/app/webroot/admin/ all images are directly viewable in form of listings. Images should be accessible in webpage but not directly through folder.
Create a .htaccess file in your directory where you need to prevent directly list of images and put this code :
Options -Indexes