Reputation: 1344
I've got a question.
the admin and employee can upload stuff into /public/files/uploads/
and the customers are only allowed to see a part of the files in uploads.
but when I login as customer and visit: /public/files/uploads/
I can open and view every file.
I would like to know how to protect this from customers, like when they try to open /public/files/uploads/
they redirect back to the home view.
This would need some sort of .htaccess
but I can't seem to figure out how to get it working.
Any help would be appreciated. Thanks in advance.
Upvotes: 2
Views: 304
Reputation: 163798
Try to put an empty index.html
file in this folder.
Also, are your normal URLs contain public
? If so, you have wrong web server configuration and you should point your web server (Apache, Nginx) to a public
directory instead of Laravel project's root folder.
Upvotes: 2