4 replies
Is it possible to create a program/ script or a link structure that will only allow someone to access a specific page from a specific page.

Let me explain. Say I want my user to see a page on my site, but I only want them to be able to view it if they found it on a particular page.

EXAMPLE: Say I place a link from mysite.com to mysite.com/abc. If you click the link on mysite.com you can go to mysite.com/abc. But if you type in to your browser mysite.com/abc you get an error message (not allowed). If someone would place that link (mysite.com/abc) on another site and somesone clicks that link they would get the same error message.

It seems to me like you pass some information in the link on mysite.com and mysite.com/abc will only allow access to it if the URL has that info passed...... or mysite.com/abc can can have a script on it that will only allow traffic from mysite.com and all other referal traffic will be redirected to another page or display an error message.

I do not want a membership site where users have to sign in. Even though that may control the issue.

Thanks
#control link #link #traffic
  • Profile picture of the author Valdor Kiebach
    yes you have to check the referer url and if it isnt the one specified then dont show it
    Try searching for HTTP_REFERER
    {{ DiscussionBoard.errors[395255].message }}
    • Profile picture of the author robitn4
      Another way to do it is use PHP sessions. Set a session variable when visitor lands on the index page. Test for the existence of the variable on the linked to page. This I do for "One-Time-Offer" pages.

      This should be more reliable than testing HTTP_REFERER because many browsers don't pass the referrer, and it can be spoofed.
      Signature

      Tim

      {{ DiscussionBoard.errors[398785].message }}
  • Profile picture of the author Alfer
    I agree with the idea of setting a session variable. If you need help send me a message.
    {{ DiscussionBoard.errors[403528].message }}
    • Profile picture of the author Bruce Hearder
      You could do this using the same technique that people use to prevent hotlinking of images..

      Check out this post I made earlier this eveining on this topic..

      It might give you some ideas on how to handle this..

      http://www.warriorforum.com/programming-talk/47113-thief-stealing-my-images-help-please.html#post440844

      Hope this helps

      Bruce
      {{ DiscussionBoard.errors[440863].message }}

Trending Topics