Hi,
I want to protect a file lets say "abc.txt" in a path like "example.com/folder/abc.txt" from being read by users, actually i want only php to be able to access that file and if i put "example.com/folder/abc.txt" in my browser i get redirected to somewhere else or get an error.
How can I do this using nginx ? i've found some topics related to password protecting a folder but i don't want to do that i only want php to be able to access it and also i can not put the file outside of public root folder.
Thanks in advance
I want to protect a file lets say "abc.txt" in a path like "example.com/folder/abc.txt" from being read by users, actually i want only php to be able to access that file and if i put "example.com/folder/abc.txt" in my browser i get redirected to somewhere else or get an error.
How can I do this using nginx ? i've found some topics related to password protecting a folder but i don't want to do that i only want php to be able to access it and also i can not put the file outside of public root folder.
Thanks in advance