Prevent direct access to a php page, only access if redirected

PHP page only accessible from another page redirect and prevent my user from accessing it directly.

you can use define() and defined() to prevent it from being directly loaded.

In the Main page which contains redirection write

On other page say nodirectaccess.php


No Comment.