Forums

This topic is locked

Identify last URL then go to a certain page

Posted 24 Oct 2001 17:50:08
1
has voted
24 Oct 2001 17:50:08 Edgar Soberanes posted:
I am developing a site wich in its index, must recognize which site I came from (there are three different ways to get on my page)based on this, the page show me an special page for each URL, so how can I recognize this URL and make the redirection? because the page where it came from are changing constantly so i can't stablish an absolute reference or give diferent links to each of the ones who put the link to my page

Replies

Replied 25 Oct 2001 09:28:13
25 Oct 2001 09:28:13 Viktor Farcic replied:
Use Request.ServerVariables("HTTP_REFERER" to retrive reffering page.

Replied 27 Oct 2001 08:28:20
27 Oct 2001 08:28:20 Edgar Soberanes replied:
thank you vfarcic, now i have identified the url i came from, but how do I relate it to the database where i have the three different pages that i can use? or do you have ideas to make this: "Ok you came from BANA.com then go to bana.asp, or ok you came frome TODO.com then go to todo.asp"???? i hope you can help me

Replied 27 Oct 2001 11:16:00
27 Oct 2001 11:16:00 Viktor Farcic replied:
Try something like:
<%
if Request.ServerVariables("HTTP_REFERER" = "URLYouCameFrom1" Then
Response.Redirect("URLToGoTo1"
Else if Request.ServerVariables("HTTP_REFERER" = "URLYouCameFrom2" Then
Response.Redirect("URLToGoTo2"
Else Request.ServerVariables("HTTP_REFERER" = "URLYouCameFrom3" Then
Response.Redirect("URLToGoTo3"
End If

If it's only three pages you don't need to use DB.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
thank you vfarcic, now i have identified the url i came from, but how do I relate it to the database where i have the three different pages that i can use? or do you have ideas to make this: "Ok you came from BANA.com then go to bana.asp, or ok you came frome TODO.com then go to todo.asp"???? i hope you can help me


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Replied 29 Oct 2001 01:04:14
29 Oct 2001 01:04:14 Edgar Soberanes replied:
Thank yo Vfarcic <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> i am not very good with the code, but i am gonna start to see how do i use that you post, anything i will write again.

Reply to this topic