View Full Version : Allow access to Page A only from Page B, different sites, and no History.Previous

12-31-2007, 05:34 AM
Hi there,

This looks like a great site for this kind of question.

I have a website where all the access validation information is kept on a separate site. I planned to have a page on the validation site which allowed users to log in and then use a hyper link to jump to the content site.

I figured I would prevent invalid users from accessing the content site by rejecting anyone whose previous site was not the specific one expected. Seems pretty easy, all I needed was a function to return the value of most recent URL visited. I even eventually found history.previous and though I had it until I realized it was Netscape only (not an option).

I admit I am pretty new to all of this, I write code with a reference site in the background and a manual in one hand. So I figure I am not seeing something obvious.

Please let me know if anyone has a solution for this. I greatly appreciate any time and effort spent in this assistance.


12-31-2007, 06:37 AM
well, I dont know about a secure way to do this in javascript... But I know many ways in PHP that are very simple. Sessions would be the simplest.
If you dont know how to do this(or php at all) and your host supports it, pm or post in the PHP forum.


12-31-2007, 07:25 AM
You can't use a session between sites. Probably the best you can do is to set up a form that provides the access from the one to the other and include some hidden fields in the form that get POSTed to the destination page. That page can then check those fields to confirm the values they contain.

12-31-2007, 08:02 PM
Thank you for your rapid replies. They tell me exactly what I need to know.

I was really hoping I was overlooking something simple. At this point, I am going to bypass the problem and just accept everything. I will revisit the issue later in my copius free time.

Thanks again.