Click to See Complete Forum and Search --> : 2 domain names different text on home page


arthuro
04-02-2003, 05:16 PM
Hi, I hope someone can help me. I have a website which has 2 domain names.
If a user1 put in domain1.com I need him to see extra text on the bottom of the page. If a user2 uses domain2.com this text should not appear.
If user2 returns to the home page from inside the site then he should still not see this additional text.

So, to restate, this text appears based on the url used to hit my site.

the home page is index.asp.

Thanks for any help.

Ribeyed
04-02-2003, 06:25 PM
hi,
not to sure about this one but you can try this:


<%
FullReferer = Request.ServerVariables("http_referer")

if FullReferer = "www.firsturl.com" then

response.write "do something"

elseif FullReferer = "www.firsturl2.com" then

response.write "do something else"

end if
%>

Hope this helps

edited:

you can also do this if you need to seperate domain from querystring:

if len(FullReferer) <= 7 then
RefererDomain = "-"
RefererQuery = "-"
else
SlashPosition = instr(8, FullReferer, "/")
if SlashPosition = 0 then
RefererDomain = FullReferer
RefererQuery = "-"
else
RefererDomain = left(FullReferer, SlashPosition - 1)
RefererQuery = right(FullReferer, len(FullReferer) - SlashPosition)
end if
End if