Obtain the URL, something wrong

Discussion in 'ASP General' started by Jose Huerta, Oct 7, 2009.

  1. Jose Huerta

    Jose Huerta Guest

    Jose Huerta, Oct 7, 2009
    #1
    1. Advertising

  2. Jose Huerta

    Evertjan. Guest

    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.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Oct 7, 2009
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed Jose Huerta
    <> writing in
    news::

    > 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.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Oct 7, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    4
    Views:
    475
    Guest
    Oct 13, 2004
  2. Pekka Järvinen
    Replies:
    2
    Views:
    663
    Richard Tobin
    Apr 29, 2008
  3. Replies:
    2
    Views:
    407
    Arved Sandstrom
    Mar 17, 2009
  4. Marco

    Help!! Obtain URL from ASP

    Marco, May 31, 2004, in forum: ASP General
    Replies:
    2
    Views:
    123
    Marco
    May 31, 2004
  5. crjunk

    Obtain URL with Request.ServerVariables

    crjunk, May 17, 2005, in forum: ASP General
    Replies:
    3
    Views:
    119
    Steven Burn
    May 17, 2005
Loading...

Share This Page