Welcome Guest, Not a member yet? Register   Sign In
Prevent access a file in public folder
#1

I have a json file inside a public folder. I want to restrict the access to the json file from browser but it can be accessed from controller. I do not know how to do it.
For example, json file is placed inside key/foo folder which inside public folder → public/key/foo/bar.json.
I created .htaccess (Deny from all) file in key folder but I still can access bar.json from the browser with this url path http://localhost/key/foo/bar.json
Any help?

Thank you.
Reply


Messages In This Thread
Prevent access a file in public folder - by septovan.dev - 07-31-2022, 01:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB