Prevent logged out users from accessing url links which are available for logged in users
<p>I have done a login page by using session variable to store username based on which users are made to login, I would like to know whether it is possible to make url links which are accessible only for the logged in users, but the url links should not be available to users who are not logged in , for example a person who is logged in , if he tries to copy the url and give it to another person and if that person pastes the url in his address bar without logging in he should redirected to a login page or some message should be displayed saying that he needs to be logged in inorder to view that particular url link . </p>

<p>I have searched in google regarding this , not able to find any solution.</p>

<p>*<em>EDIT *</em>
Actually the link  is a https page whose url needs to be hidden , similar to the way we hide the path of pdf which are used for downloading using header .</p>

<p>For Example i make a php page where if the username is in session and he clicks a link he will be redirected to this link page but he cannot see the url .</p>

<p>Thanks </p>
