# Redirect if not referred from specific page

**URL:** <https://forum.kirupa.com/t/redirect-if-not-referred-from-specific-page/116241>\
**Category:** Uncategorized\
**Created:** [July 15, 2004, 8:50pm UTC](https://forum.kirupa.com/t/redirect-if-not-referred-from-specific-page/116241 "2004-07-15T20:50:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtesp](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jtesp](https://forum.kirupa.com/u/jtesp)\
**Post date:** [July 15, 2004, 8:50pm UTC](https://forum.kirupa.com/t/redirect-if-not-referred-from-specific-page/116241/1 "2004-07-15T20:50:13Z")

</div>

Here’s the scoop:  
I don’t want anyone adjusting the id url parameters and accessing pages they shouldn’t be seeing.

So basically…how do I make it so details.php is ONLY accessible by clicking a link from the master.php page? I don’t want anyone to be able to access it by typing in the url, and I don’t want it to be clickable through any other link other than master.php thats on my site. If it’s hotlinked or directly accessed, I want to redirect them to index.php

Is there a php solution? Or an .htaccess solution? I have no idea how to do this and it’s driving me nuts! Please help!

Thanks!
