Sunday, August 2, 2009

How to do url-asp redirection not to enter specific page other than in sequence?

How to do url-asp redirection. Step 1: join.asp Step 2: edu.add.asp IF coming from join asp, OPEN, else REDIRECT index.asp Step 3: other.add.asp IF coming from edu.add.asp, OPEN, else REDIRECT index.asp Step 4: exp.add.asp IF coming from other.add.asp, OPEN, else REDIRECT index.asp Step 5: att.add.asp IF coming from att.add.asp, OPEN, else REDIRECT index.asp

How to do url-asp redirection not to enter specific page other than in sequence?
On each of your pages you are going to do two things...





1) Detect the page they just came from using something like Request.ServerVariables( "HTTP_REFERER" ) which will give you the URL of the page they came from.





2) Then use the response.redir() method to send the user to the appropriate page.





Example...





%26lt;%


if Request.ServerVariables( "HTTP_REFERER" ) = "http://www.myaddy.com/ join.asp" then





response.redir("index.asp")


end if


%%26gt;





So you do this in sequence on each page and you should then find it pretty easy. I have included a links on the two items mentioned here. Good luck!


No comments:

Post a Comment