0

I am trying to hide directories from being visit by user on my website here is the link I have which is fine

http://localhost:8080/JobScholar/storage/app/public/newpaper_jobs/230_Govrenment-Of-The-Punjab-Agriculture-Department.jpg

But when I type

http://localhost:8080/JobScholar/storage/app/public/newpaper_jobs

I got the list of my images which I don't want to show I place an empty index.php file but it work for particular directory not for sub directories.

What is the best possible way to secure my directories?

Martin54
  • 1,349
  • 2
  • 13
  • 34
  • Remove from htdocs folder and reroute using php – Robert Sep 08 '17 at 21:57
  • can i have an example to get your idea what if when i live my site that again directories will work when publish website in public_html folder @RobertRocha – arfa imtiaz Sep 08 '17 at 22:04
  • might help https://stackoverflow.com/questions/19923091/avoid-public-folder-of-laravel-and-open-directly-the-root-in-web-server – Robert Sep 08 '17 at 22:08

1 Answers1

0

You want to keep those assets in a folder that is not public. A few approaches can be found in this thread

Gadurp1
  • 91
  • 6