redirection

Discussion in 'ASP General' started by Hugh Welford, Apr 25, 2006.

  1. Hugh Welford

    Hugh Welford Guest

    Hi - I have an obsolete site residing in a host domain sub-directory, many
    pages of which are listed in google. Dont want to lose valuable google
    listings.

    Can anyone tell me how to re-direct .htm pages? If the whole site were
    deleted, is it possible to customise the 404 page not found page so that it
    re-directs to the new site?

    Thanks

    Hugh
    Hugh Welford, Apr 25, 2006
    #1
    1. Advertising

  2. Hugh Welford

    Mike Brind Guest

    Hugh Welford wrote:
    > Hi - I have an obsolete site residing in a host domain sub-directory, many
    > pages of which are listed in google. Dont want to lose valuable google
    > listings.
    >
    > Can anyone tell me how to re-direct .htm pages? If the whole site were
    > deleted, is it possible to customise the 404 page not found page so that it
    > re-directs to the new site?
    >
    > Thanks
    >
    > Hugh


    <meta http-equiv="refresh" content="n(secs);
    url=http://www.wherever.com/newfile" />

    but you really should have asked this question in an html group.

    --
    Mike Brind
    Mike Brind, Apr 26, 2006
    #2
    1. Advertising

  3. Hugh Welford

    Mike Brind Guest

    Mike Brind wrote:
    > Hugh Welford wrote:
    > > Hi - I have an obsolete site residing in a host domain sub-directory, many
    > > pages of which are listed in google. Dont want to lose valuable google
    > > listings.
    > >
    > > Can anyone tell me how to re-direct .htm pages? If the whole site were
    > > deleted, is it possible to customise the 404 page not found page so that it
    > > re-directs to the new site?
    > >
    > > Thanks
    > >
    > > Hugh

    >
    > <meta http-equiv="refresh" content="n(secs);
    > url=http://www.wherever.com/newfile" />
    >
    > but you really should have asked this question in an html group.
    >


    On the other hand, asking this question in an asp group isn't so wrong:

    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location", "http://www.wherever.com/newfile"
    %>

    I nearly forgot all about that :)

    --
    Mike Brind
    Mike Brind, Apr 26, 2006
    #3
  4. Hugh Welford

    Evertjan. Guest

    Mike Brind wrote on 26 apr 2006 in
    microsoft.public.inetserver.asp.general:

    > Hugh Welford wrote:
    >> Hi - I have an obsolete site residing in a host domain sub-directory,
    >> many pages of which are listed in google. Dont want to lose valuable
    >> google listings.
    >>
    >> Can anyone tell me how to re-direct .htm pages? If the whole site
    >> were deleted, is it possible to customise the 404 page not found
    >> page so that it re-directs to the new site?
    >>
    >> Thanks
    >>
    >> Hugh

    >
    > <meta http-equiv="refresh" content="n(secs);
    > url=http://www.wherever.com/newfile" />
    >
    > but you really should have asked this question in an html group.


    ... except when this old site is equiped with ASP and set to run ASP on
    it's .html pages. Then you could set on each page:

    <%
    response.redirect "http://mynewsite.xyz" &_
    request.servervariables("SCRIPT_NAME")
    %>

    =============

    ... or: when this old site is equiped with ASP and and has a dedicated
    404.asp page, that is code accessable to you, and could be set to detect
    the actual failed page request and redirect accordingly.

    =============

    However, I then would recomment making a noindex, follow construction for
    updating the bots.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Apr 26, 2006
    #4
  5. Hugh Welford

    Evertjan. Guest

    Mike Brind wrote on 26 apr 2006 in microsoft.public.inetserver.asp.general:

    > <%
    > Response.Status="301 Moved Permanently"
    > Response.AddHeader "Location", "http://www.wherever.com/newfile"
    > %>
    >


    That is even better!

    and it could be implemented on a dedicated 404.asp, I suppose.

    Does Response.AddHeader "Location",.. do an immediate redirect,
    or after a Response.end?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Apr 26, 2006
    #5
  6. Hugh Welford

    Mike Brind Guest

    Evertjan. wrote:
    > Mike Brind wrote on 26 apr 2006 in microsoft.public.inetserver.asp.general:
    >
    > > <%
    > > Response.Status="301 Moved Permanently"
    > > Response.AddHeader "Location", "http://www.wherever.com/newfile"
    > > %>
    > >

    >
    > That is even better!
    >
    > and it could be implemented on a dedicated 404.asp, I suppose.
    >
    > Does Response.AddHeader "Location",.. do an immediate redirect,
    > or after a Response.end?
    >


    After Response.End. On an asp page that has a load of calls to
    databases, it would be worth popping Response.End just after
    Response.Addheader "Location",... to save the rest of the page being
    processed. Since the OP has plain html in his files, it's not so
    necessary, but as you point out, he would have to set his server up to
    run .htm files as asp.

    I don't think he would need a 404 page. After a few months, the search
    engines that index the old site should all have updated their indexes,
    so deleting the old site without repercussions should be ok.

    --
    Mike Brind
    Mike Brind, Apr 26, 2006
    #6
  7. Hugh Welford

    Hugh Welford Guest

    Thanks very much guys - very helpful


    "Hugh Welford" <> wrote in message
    news:%...
    > Hi - I have an obsolete site residing in a host domain sub-directory, many
    > pages of which are listed in google. Dont want to lose valuable google
    > listings.
    >
    > Can anyone tell me how to re-direct .htm pages? If the whole site were
    > deleted, is it possible to customise the 404 page not found page so that
    > it re-directs to the new site?
    >
    > Thanks
    >
    > Hugh
    >
    Hugh Welford, Apr 26, 2006
    #7
    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. MadHatter

    input redirection

    MadHatter, Oct 14, 2003, in forum: Perl
    Replies:
    6
    Views:
    684
    MadHatter
    Oct 16, 2003
  2. S
    Replies:
    1
    Views:
    805
  3. Matt
    Replies:
    0
    Views:
    300
  4. headware

    controlling redirection within frames

    headware, Aug 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    323
    headware
    Aug 5, 2003
  5. Ravikanth[MVP]

    Redirection pronblem

    Ravikanth[MVP], Aug 11, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    309
    Platino
    Aug 11, 2003
Loading...

Share This Page