Click to See Complete Forum and Search --> : Redirect code


TheCraigBack
04-21-2006, 02:42 AM
Hey there, is there a way I can have an index.asp page that will redirect the user depending on how the user got there?

For example, I have a site (domain 1) that has another domain (domain 2) that is pointing to it. Can i have domain 1 point to the original site, and domain 2 point somewhere else?

I hope that made sense.
Any help is appreciated

Terrorke
04-21-2006, 06:00 AM
If I understand it correct you want to check from wich domain a user is comming and than redirect him to the right site??

This is how I would do this


<%
dim ref
ref = request.ServerVariables("HTTP_REFERER")

if ref = "domain1" then
response.redirect("index.asp")
elseif ref = "domain2" then
response.redirect("index2.asp")
end if

%>


My only question is what do you do with the users how browse directly to your site???