Obtain the URL, something wrong

E

Evertjan.

Jose Huerta wrote on 07 okt 2009 in
microsoft.public.inetserver.asp.general:
I wnat to obtain the URL the client asked for. But when using the
variables of request.servervariables(...) i have the next issue:

If someone put http://www.contoso.com the URL that i can obtain is
http://www.contoso.com/default.asp. So I can not difference between
these two URL.

The objective is to redirect www.contoso.com/default.asp to
www.contoso.com in order to avoid duplicate contents.

I think you can only do this with clientside scripting.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Jose Huerta
I wnat to obtain the URL the client asked for. But when using the
variables of request.servervariables(...) i have the next issue:

If someone put http://www.contoso.com the URL that i can obtain is
http://www.contoso.com/default.asp. So I can not difference between
these two URL.

The objective is to redirect www.contoso.com/default.asp to
www.contoso.com in order to avoid duplicate contents.

Are you contoso.com? That's a Microsoft domain, and redirects to
http://www.microsoft.com/en/us/default.aspx. Are you asking about
contoso.com or are you using that as an generic URL?

If you are using it for a generic URL, example.com was set up just for
that purpose.

I do not understand your question. If the default document for
example.com is default.asp, then someone typing in example.com or
www.example.com will still go to default.asp because that is the default
document on the server. There is no duplicate content.

If this is a matter for search engines, you might want to look at the
canonical link, eg:
<link rel="canonical" href="http://www.example.com/default.asp" />
Google understands that default.asp?item=123 and default.asp?item=456
are the same thing as default.asp . Yahoo and Bing also recognize this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top