may be this will also help
<SCRIPT LANGUAGE=3D"JavaScript"><!--
var who =3D document.referrer;
if (who.indexOf('www.domain1.com') !=3D -1)
window.location.href =3D 'http://www.domain1.com/domain1/';
if (who.indexOf('www.domain2.com') !=3D -1)
window.location.href =3D 'http://www.domain2.com/domain2/';
else
alert('Where DID you come from?');
//--></SCRIPT>
"Marcelo" <cyborg@m...> wrote:
When I was the same situation, I used INSTR to cut the string in all the
parts
I needed.....maybe it wasn't the best way, but it works fine.
----- Original Message -----
From: JstMeHr4u3
To: ASP Web HowTo
Sent: Thursday, March 15, 2001 2:59 PM
Subject: [asp_web_howto] request.servervariables("HTTP_Referer")
I am currently working on a project that by determining where they came
from, decides what they see.
Meaning if you come from www.aaa.com display aaa.com gifs. if you come
from
www.bbb.com display bbb.com gifs.
I am using Request.ServerVariables("HTTP_REFERER") to tell me where the
y
came from, but the problem is that it will display everything that was in
the
address bar, meaning it could be https://cgi.aaa.com/listings/pages.asp a
nd
you cannot run a comparison because although it came from the aaa.com dom
ain,
it will not equal www.aaa.com when compared.
Well I played with it for awhile and wrote a vbscript that would cut
everything from the first "." and everything after the ".com" so you are
left
with aaa.com or bbb.com to run my comparisons.
I was wondering if this is the best way to do it, or is there a more
efficient way?
If it is the only way, I would be happy to share by Function for those
who
would like it!
Mike Scott