Welcome! Log In Create A New Profile


Protecting a file

Posted by inspiron 
Protecting a file
April 18, 2013 02:45PM

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
Re: Protecting a file
April 18, 2013 03:40PM
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready