Welcome! Log In Create A New Profile

Advanced

Protecting a file

Posted by inspiron 
Protecting a file
April 18, 2013 02:45PM
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
Re: Protecting a file
April 18, 2013 03:40PM
http://stackoverflow.com/questions/13661406/deny-access-to-a-php-file-nginx
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 131
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready