I don't know if this can be achieved... I'll try anyway. I'd like to deny php files in a certain folder to be viewable if loaded directly (you point the browser to the direct URL), but only if you clicked on a link pointing to them on a certain page. Can this be achieved in nginx with a location..? It's nothing security involved, so if the method isn't 100% secure it's not a problem..
EDIT: Ok, let's add some details.. I have a VPS and I have a page with a login box. After you enter the login details you access to a page with links to phpinfo/phpsysinfo/webmin panel/apc status/nginx status. So a page where you have links to software to monitor stats of my VPS. I know that security through obscurity isn't ok but I feel more confortable to have those info not really exposed. So I'd like to deny access to those pages (all in 1 directory) denying direct access (but only if you come from the page protected by login box).