-2
Basically, I have a file JSON
in my project that contains information I wish not to access by typing in the address bar something like: www.meusite.com/file.json
And that goes for other files. How can I redirect the user to the home page if they type something like this?
The redirect really works. The problem is that I need to read this file on other pages and it has become unavailable...
– Luiz Filipe Da Silva
The file is unavailable if you try to access it directly from the browser, but you can still access it normally with PHP. So you can do something like:
echo file_get_contents("arquivo.php");
and first define who has access– Costamilam
Um... this is nice. Sorry my inexperience kkkk but how do I define who has access?
– Luiz Filipe Da Silva
Usually through authentication
– Costamilam