Forums
This topic is locked
Restricting Page access by URL
Posted 23 Jul 2003 05:03:21
1
has voted
23 Jul 2003 05:03:21 NaiWah Lui posted:
hiHow do i restrict access to a page when it is not coming from certain URL.
For Example, i have 2 pages namely A and B page. I want to make sure that users must go through A first then B, and yet cannot access B directly.
thanks
Replies
Replied 23 Jul 2003 07:52:55
23 Jul 2003 07:52:55 Dave Clarke replied:
Not sure about this but you might be able to do something with the server variable HTTP_REFERER.
On page B have something like
<%
If Request.ServerVariables("HTTP_REFERER"
<> "mydomain.com/pageA"
Then Response.Redirect("mydomain.com/errorpage")
Else
%>
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome
On page B have something like
<%
If Request.ServerVariables("HTTP_REFERER"

Then Response.Redirect("mydomain.com/errorpage")
Else
%>
Dave
ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome