file renamed after server upgrade

Discussion in 'ASP General' started by c676228, Jan 25, 2008.

  1. c676228

    c676228 Guest

    Hi all,
    Recently we are upgrading and merge our servers. We will move all *.html
    hosted on a unix system to our windows server. During the migration, we also
    upgrade almost all of our code, say almost all html pages have been renamed
    to *.asp in order to handle those pages dynamically. But the issue here is
    our original *.html pages are ranked very highly by search engine. We are not
    sure what kind of redirect will be benign to search engines. And it seems
    that there is no one-page auto redirects solution like you can do with unix
    system (.htaccess file). On windows server, you have to redirect
    individually. (man, think about if you have thousands of pages on a site.)
    I searched a bit, the following code seems to do the job:
    put this code on the top of every page I wish to be redirected:
    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently"
    Response.AddHeader "Location", "http://www.example.com/yournewpage.asp"
    %>

    am I right? But I cannot do this way in the original *.html file since it is
    not *.asp code. I have to use javascript to do dynamically redirect anyway.
    but what kind of redirect will be beneficial to Search Engine, the
    instantaneous meta refresh redirect or the old page with all the old content
    removed and having a link towards the new page, which way is better, one
    click or no click to get to the new page.
    --
    Betty
    c676228, Jan 25, 2008
    #1
    1. Advertising

  2. c676228

    c676228 Guest

    RE: redirect search engine highly ranked page

    Hi all,
    sorry I have to change the original subject since it doesn't make any sense
    --
    Betty


    "c676228" wrote:

    > Hi all,
    > Recently we are upgrading and merge our servers. We will move all *.html
    > hosted on a unix system to our windows server. During the migration, we also
    > upgrade almost all of our code, say almost all html pages have been renamed
    > to *.asp in order to handle those pages dynamically. But the issue here is
    > our original *.html pages are ranked very highly by search engine. We are not
    > sure what kind of redirect will be benign to search engines. And it seems
    > that there is no one-page auto redirects solution like you can do with unix
    > system (.htaccess file). On windows server, you have to redirect
    > individually. (man, think about if you have thousands of pages on a site.)
    > I searched a bit, the following code seems to do the job:
    > put this code on the top of every page I wish to be redirected:
    > <%@ Language=VBScript %>
    > <%
    > Response.Status="301 Moved Permanently"
    > Response.AddHeader "Location", "http://www.example.com/yournewpage.asp"
    > %>
    >
    > am I right? But I cannot do this way in the original *.html file since it is
    > not *.asp code. I have to use javascript to do dynamically redirect anyway.
    > but what kind of redirect will be beneficial to Search Engine, the
    > instantaneous meta refresh redirect or the old page with all the old content
    > removed and having a link towards the new page, which way is better, one
    > click or no click to get to the new page.
    > --
    > Betty
    c676228, Jan 25, 2008
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed =?Utf-8?B?YzY3NjIyOA==?=
    <> writing in
    news::

    > Hi all,
    > Recently we are upgrading and merge our servers. We will move all
    > *.html hosted on a unix system to our windows server. During the
    > migration, we also upgrade almost all of our code, say almost all html
    > pages have been renamed to *.asp in order to handle those pages
    > dynamically. But the issue here is our original *.html pages are
    > ranked very highly by search engine. We are not sure what kind of
    > redirect will be benign to search engines. And it seems that there is
    > no one-page auto redirects solution like you can do with unix system
    > (.htaccess file). On windows server, you have to redirect
    > individually. (man, think about if you have thousands of pages on a
    > site.) I searched a bit, the following code seems to do the job:
    > put this code on the top of every page I wish to be redirected:
    ><%@ Language=VBScript %>
    ><%
    > Response.Status="301 Moved Permanently"
    > Response.AddHeader "Location",
    > "http://www.example.com/yournewpage.asp" %>
    >
    > am I right? But I cannot do this way in the original *.html file since
    > it is not *.asp code. I have to use javascript to do dynamically
    > redirect anyway. but what kind of redirect will be beneficial to
    > Search Engine, the instantaneous meta refresh redirect or the old
    > page with all the old content removed and having a link towards the
    > new page, which way is better, one click or no click to get to the
    > new page.


    IIRC there is something that you can do with custom error pages.

    --
    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, Jan 26, 2008
    #3
  4. c676228

    Evertjan. Guest

    Dave Anderson wrote on 26 jan 2008 in
    microsoft.public.inetserver.asp.general:

    > "c676228" wrote:
    >> I searched a bit, the following code seems to do the job:
    >> put this code on the top of every page I wish to be redirected:
    >> <%@ Language=VBScript %>
    >> <%
    >> Response.Status="301 Moved Permanently"
    >> Response.AddHeader "Location",
    >> "http://www.example.com/yournewpage.asp" %>
    >>
    >> am I right? But I cannot do this way in the original *.html file
    >> since it is not *.asp code.

    >
    > You can configure IIS to parse .html files the same as .asp.
    > Alternatively, you can construct a custom 404 handler. Either should
    > be capable of generating such a permanent redirect.


    Since my servers are virtual and remote,
    I use the latter option:

    =========== 404.asp =============
    <% ' vbs
    qstr = Request.ServerVariables("QUERY_STRING")
    if instr(lcase(qstr),".html")>0 then
    on error resume next
    x = replace(x,"404;http://www.example.com:80","")
    x = replace(x,".html",".asp")
    server.transfer x
    on error goto 0
    end if
    %>
    <body>
    This is the 404 error page of www.example.com
    </body>
    ==================================

    Not tested, but roughly similar to my own proven 404.asp files

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 26, 2008
    #4
  5. RE: redirect search engine highly ranked page

    Hi Betty,

    If you want to keep those html files and let the html file do the
    redirection, you can consider using the html meta tag to do the
    redirection. Here is the example:

    #Redirect to a Different URL using the Meta Tag "Refresh"
    http://webmaster.iu.edu/tool_guide_info/refresh_metatag.shtml

    Also, If you have thousands of html pages that need to redirect to their
    asp version ones, I think you may consider develop a custom ISAPI filter
    component and plug in your IIS server which intercept those html page
    requests and redirect to the ASP pages if necessary.

    #Redirecting ISAPI Filter
    http://www.15seconds.com/issue/961220.htm

    #HOWTO: Redirect the browser to a new URL based on Referer
    http://blogs.msdn.com/david.wang/archive/2005/12/06/HOWTO-Redirect-the-brows
    er-to-a-new-URL-based-on-Referer.aspx

    Also, if you search "ISAPI filter" and "url rewrite", you will find many
    existing commerical products that do such functions.

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >From: =?Utf-8?B?YzY3NjIyOA==?= <>
    >References: <>
    >Subject: RE: redirect search engine highly ranked page
    >Date: Fri, 25 Jan 2008 14:55:01 -0800


    >
    >Hi all,
    >sorry I have to change the original subject since it doesn't make any sense
    >--
    >Betty
    >
    >
    >"c676228" wrote:
    >
    >> Hi all,
    >> Recently we are upgrading and merge our servers. We will move all *.html
    >> hosted on a unix system to our windows server. During the migration, we

    also
    >> upgrade almost all of our code, say almost all html pages have been

    renamed
    >> to *.asp in order to handle those pages dynamically. But the issue here

    is
    >> our original *.html pages are ranked very highly by search engine. We

    are not
    >> sure what kind of redirect will be benign to search engines. And it

    seems
    >> that there is no one-page auto redirects solution like you can do with

    unix
    >> system (.htaccess file). On windows server, you have to redirect
    >> individually. (man, think about if you have thousands of pages on a

    site.)
    >> I searched a bit, the following code seems to do the job:
    >> put this code on the top of every page I wish to be redirected:
    >> <%@ Language=VBScript %>
    >> <%
    >> Response.Status="301 Moved Permanently"
    >> Response.AddHeader "Location", "http://www.example.com/yournewpage.asp"
    >> %>
    >>
    >> am I right? But I cannot do this way in the original *.html file since

    it is
    >> not *.asp code. I have to use javascript to do dynamically redirect

    anyway.
    >> but what kind of redirect will be beneficial to Search Engine, the
    >> instantaneous meta refresh redirect or the old page with all the old

    content
    >> removed and having a link towards the new page, which way is better,

    one
    >> click or no click to get to the new page.
    >> --
    >> Betty

    >
    Steven Cheng[MSFT], Jan 28, 2008
    #5
  6. Evertjan. wrote on 26 Jan 2008 12:49:20 GMT:

    > Dave Anderson wrote on 26 jan 2008 in
    > microsoft.public.inetserver.asp.general:


    >> "c676228" wrote:
    >>> I searched a bit, the following code seems to do the job:
    >>> put this code on the top of every page I wish to be redirected:
    >>> <%@ Language=VBScript %>
    >>> <%
    >>> Response.Status="301 Moved Permanently"
    >>> Response.AddHeader "Location",
    >>> "http://www.example.com/yournewpage.asp" %>


    >>> am I right? But I cannot do this way in the original *.html file
    >>> since it is not *.asp code.


    >> You can configure IIS to parse .html files the same as .asp.
    >> Alternatively, you can construct a custom 404 handler. Either should
    >> be capable of generating such a permanent redirect.


    > Since my servers are virtual and remote,
    > I use the latter option:


    > =========== 404.asp =============
    > <% ' vbs qstr = Request.ServerVariables("QUERY_STRING")
    > if instr(lcase(qstr),".html")>0 then
    > on error resume next
    > x = replace(x,"404;http://www.example.com:80","")


    Shouldn't this be

    x = replace(qstr,"404;http://www.example.com:80","")

    > x = replace(x,".html",".asp")
    > server.transfer x
    > on error goto 0 end if %>
    > <body>
    > This is the 404 error page of www.example.com </body>
    > ==================================


    > Not tested, but roughly similar to my own proven 404.asp files


    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)



    --
    Dan
    Daniel Crichton, Jan 28, 2008
    #6
  7. c676228

    Evertjan. Guest

    Daniel Crichton wrote on 28 jan 2008 in
    microsoft.public.inetserver.asp.general:

    > Evertjan. wrote on 26 Jan 2008 12:49:20 GMT:
    >
    >> Dave Anderson wrote on 26 jan 2008 in
    >> microsoft.public.inetserver.asp.general:

    >
    > >> "c676228" wrote:
    > >>> I searched a bit, the following code seems to do the job:
    > >>> put this code on the top of every page I wish to be redirected:
    > >>> <%@ Language=VBScript %>
    > >>> <%
    > >>> Response.Status="301 Moved Permanently"
    > >>> Response.AddHeader "Location",
    > >>> "http://www.example.com/yournewpage.asp" %>

    >
    > >>> am I right? But I cannot do this way in the original *.html file
    > >>> since it is not *.asp code.

    >
    > >> You can configure IIS to parse .html files the same as .asp.
    > >> Alternatively, you can construct a custom 404 handler. Either should
    > >> be capable of generating such a permanent redirect.

    >
    >> Since my servers are virtual and remote,
    >> I use the latter option:

    >
    >> =========== 404.asp =============
    >> <% ' vbs qstr = Request.ServerVariables("QUERY_STRING")
    >> if instr(lcase(qstr),".html")>0 then
    >> on error resume next
    >> x = replace(x,"404;http://www.example.com:80","")

    >
    > Shouldn't this be
    >
    > x = replace(qstr,"404;http://www.example.com:80","")


    Indeed

    >> x = replace(x,".html",".asp")
    >> server.transfer x
    >> on error goto 0 end if %>
    >> <body>
    >> This is the 404 error page of www.example.com </body>
    >> ==================================

    >
    >> Not tested, but roughly similar to my own proven 404.asp files

    >
    >> --
    >> Evertjan.
    >> The Netherlands.
    >> (Please change the x'es to dots in my emailaddress)

    >
    >




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 28, 2008
    #7
  8. c676228

    c676228 Guest

    Hi all,
    Thanks for your input. I took Evertjan's suggestion and used the 404 page to
    redirect all the *.html pages to *.asp page.
    and just changed server.transfer to Response.Redirect x to make it work
    correctly.
    somehow, server.transfer just doesn't work.

    thanks, thanks to Evertjan.

    --
    Betty


    "Evertjan." wrote:

    > Dave Anderson wrote on 26 jan 2008 in
    > microsoft.public.inetserver.asp.general:
    >
    > > "c676228" wrote:
    > >> I searched a bit, the following code seems to do the job:
    > >> put this code on the top of every page I wish to be redirected:
    > >> <%@ Language=VBScript %>
    > >> <%
    > >> Response.Status="301 Moved Permanently"
    > >> Response.AddHeader "Location",
    > >> "http://www.example.com/yournewpage.asp" %>
    > >>
    > >> am I right? But I cannot do this way in the original *.html file
    > >> since it is not *.asp code.

    > >
    > > You can configure IIS to parse .html files the same as .asp.
    > > Alternatively, you can construct a custom 404 handler. Either should
    > > be capable of generating such a permanent redirect.

    >
    > Since my servers are virtual and remote,
    > I use the latter option:
    >
    > =========== 404.asp =============
    > <% ' vbs
    > qstr = Request.ServerVariables("QUERY_STRING")
    > if instr(lcase(qstr),".html")>0 then
    > on error resume next
    > x = replace(x,"404;http://www.example.com:80","")
    > x = replace(x,".html",".asp")
    > server.transfer x
    > on error goto 0
    > end if
    > %>
    > <body>
    > This is the 404 error page of www.example.com
    > </body>
    > ==================================
    >
    > Not tested, but roughly similar to my own proven 404.asp files
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
    >
    c676228, Jan 28, 2008
    #8
  9. "c676228" <> wrote in message
    news:...
    > Hi all,
    > Thanks for your input. I took Evertjan's suggestion and used the 404 page

    to
    > redirect all the *.html pages to *.asp page.
    > and just changed server.transfer to Response.Redirect x to make it work
    > correctly.
    > somehow, server.transfer just doesn't work.
    >
    > thanks, thanks to Evertjan.
    >



    The problem you will have with a custom 404 page is that the request is
    transfered to the 404 page via a 302 object moved response to the client.

    Instead of server.transfer you might try sending your 301 response instead
    of using a server.transfer in the 404 page. However I can't tell you
    whether search engines are intelligent enough to apply the 301 response to
    the original request URL.

    A better solution would be to use an ISAPI filter to re-write the requested
    URL.

    Another solution would've have been to not have renamed the .html to .asp
    and simply added .html to the list of file extensions handled as an ASP
    script.

    BTW, have you considered the impact on your system where previously static
    and cachable html pages appear as dynamic content to the client. Your site
    will not benefit from browser and proxy caches anywhere as much as it was.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Jan 29, 2008
    #9
  10. c676228

    Evertjan. Guest

    Anthony Jones wrote on 29 jan 2008 in
    microsoft.public.inetserver.asp.general:

    > "c676228" <> wrote in message
    > news:...
    >> Hi all,
    >> Thanks for your input. I took Evertjan's suggestion and used the 404
    >> page

    > to
    >> redirect all the *.html pages to *.asp page.
    >> and just changed server.transfer to Response.Redirect x to make it
    >> work correctly.
    >> somehow, server.transfer just doesn't work.


    server.transfer works fine here.

    Please, OP, temporarily test in your 404.asp page for the exact
    querystring string by doing a nonexistant .html request before you start
    coding the string manipulation:

    Response.Write Request.ServerVariables("QUERY_STRING")
    Response.end

    >>
    >> thanks, thanks to Evertjan.
    >>

    >
    >
    > The problem you will have with a custom 404 page is that the request
    > is transfered to the 404 page via a 302 object moved response to the
    > client.


    If this is true, and it probably is with response.redirect, then it is
    just as requested, as indeed the object is moved.

    But I am using server.transfer extensively, and here, as the fysical
    ..html page no longer exists, the 404.asp page is immediately invoked and
    with my server.transfer the .html page mimiques the real asp page and
    returnss a 200 status.

    I even have about 300 virtual .asp pages in a nonexistent directory on a
    server sharing one real asp page and invoked via this 404.asp code if
    theatdirectory name is detected. The different page names are resolved in
    the single page asp-vbs code to render the required html.


    > Instead of server.transfer you might try sending your 301 response
    > instead of using a server.transfer in the 404 page. However I can't
    > tell you whether search engines are intelligent enough to apply the
    > 301 response to the original request URL.
    >
    > A better solution would be to use an ISAPI filter to re-write the
    > requested URL.


    I hate that word "better".

    "Another" is fine:

    > Another solution would've have been to not have renamed the .html to
    > .asp and simply added .html to the list of file extensions handled as
    > an ASP script.


    Many of us [see below] have no access to the IIS settings they use,
    but if you have, it seems a nice move. "The best" comes to mind.
    ;-)

    > BTW, have you considered the impact on your system where previously
    > static and cachable html pages appear as dynamic content to the
    > client.


    I reckon most of our [this NG reader's] servers have less than a few
    thousands visits a day, so the impact is unimportant for most of us.

    > Your site will not benefit from browser and proxy caches
    > anywhere as much as it was.


    Not in the case of server.transfer, as to the outside cyberworld the
    virtual page is just a page.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jan 29, 2008
    #10
  11. "Evertjan." <> wrote in message
    news:Xns9A3482280E9Aeejj99@194.109.133.242...
    > Anthony Jones wrote on 29 jan 2008 in
    > microsoft.public.inetserver.asp.general:
    >
    > > "c676228" <> wrote in message
    > > news:...
    > >> Hi all,
    > >> Thanks for your input. I took Evertjan's suggestion and used the 404
    > >> page

    > > to
    > >> redirect all the *.html pages to *.asp page.
    > >> and just changed server.transfer to Response.Redirect x to make it
    > >> work correctly.
    > >> somehow, server.transfer just doesn't work.

    >
    > server.transfer works fine here.
    >
    > Please, OP, temporarily test in your 404.asp page for the exact
    > querystring string by doing a nonexistant .html request before you start
    > coding the string manipulation:
    >
    > Response.Write Request.ServerVariables("QUERY_STRING")
    > Response.end
    >
    > >>
    > >> thanks, thanks to Evertjan.
    > >>

    > >
    > >
    > > The problem you will have with a custom 404 page is that the request
    > > is transfered to the 404 page via a 302 object moved response to the
    > > client.

    >
    > If this is true, and it probably is with response.redirect, then it is
    > just as requested, as indeed the object is moved.
    >


    After some testing it seems this behaviour is historical. I can only
    reproduce it on IIS 5.0 when the original request is for an ASP page.
    Otherwise the redirect is handled internally by IIS.

    > But I am using server.transfer extensively, and here, as the fysical
    > .html page no longer exists, the 404.asp page is immediately invoked and
    > with my server.transfer the .html page mimiques the real asp page and
    > returnss a 200 status.
    >
    > I even have about 300 virtual .asp pages in a nonexistent directory on a
    > server sharing one real asp page and invoked via this 404.asp code if
    > theatdirectory name is detected. The different page names are resolved in
    > the single page asp-vbs code to render the required html.
    >
    >
    > > Instead of server.transfer you might try sending your 301 response
    > > instead of using a server.transfer in the 404 page. However I can't
    > > tell you whether search engines are intelligent enough to apply the
    > > 301 response to the original request URL.
    > >
    > > A better solution would be to use an ISAPI filter to re-write the
    > > requested URL.

    >
    > I hate that word "better".
    >
    > "Another" is fine:
    >
    > > Another solution would've have been to not have renamed the .html to
    > > .asp and simply added .html to the list of file extensions handled as
    > > an ASP script.

    >
    > Many of us [see below] have no access to the IIS settings they use,
    > but if you have, it seems a nice move. "The best" comes to mind.
    > ;-)
    >
    > > BTW, have you considered the impact on your system where previously
    > > static and cachable html pages appear as dynamic content to the
    > > client.

    >
    > I reckon most of our [this NG reader's] servers have less than a few
    > thousands visits a day, so the impact is unimportant for most of us.
    >


    Could be but equally I reckon the many maintain ASP sites that get way more,
    for example intranet sites.

    > > Your site will not benefit from browser and proxy caches
    > > anywhere as much as it was.

    >
    > Not in the case of server.transfer, as to the outside cyberworld the
    > virtual page is just a page.
    >


    Except that the static content handler in IIS will automatically generate
    ETag and Last-Modified headers and respond with 304 when appropriate. Where
    as ASP will only do that if you so code it to.

    This is particularly significant where with returning visitors, most of
    which will be using IE and most of which will do so with default settings
    which will typically ignore fresh content in the cache the first time URL is
    fetched in a IE session.

    I stated in my orignal response its something to consider but you are
    correct that there is a good chance this isn't significant.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Jan 29, 2008
    #11
  12. c676228

    c676228 Guest

    Hi all,

    Anthony's comments make me think the solution again. We cannot afford to
    lose traffic. I have to do some more research and get back to you again a
    couple of days later since so far I cannot completely understand the
    situation yet.
    --
    Betty


    "Anthony Jones" wrote:

    > "Evertjan." <> wrote in message
    > news:Xns9A3482280E9Aeejj99@194.109.133.242...
    > > Anthony Jones wrote on 29 jan 2008 in
    > > microsoft.public.inetserver.asp.general:
    > >
    > > > "c676228" <> wrote in message
    > > > news:...
    > > >> Hi all,
    > > >> Thanks for your input. I took Evertjan's suggestion and used the 404
    > > >> page
    > > > to
    > > >> redirect all the *.html pages to *.asp page.
    > > >> and just changed server.transfer to Response.Redirect x to make it
    > > >> work correctly.
    > > >> somehow, server.transfer just doesn't work.

    > >
    > > server.transfer works fine here.
    > >
    > > Please, OP, temporarily test in your 404.asp page for the exact
    > > querystring string by doing a nonexistant .html request before you start
    > > coding the string manipulation:
    > >
    > > Response.Write Request.ServerVariables("QUERY_STRING")
    > > Response.end
    > >
    > > >>
    > > >> thanks, thanks to Evertjan.
    > > >>
    > > >
    > > >
    > > > The problem you will have with a custom 404 page is that the request
    > > > is transfered to the 404 page via a 302 object moved response to the
    > > > client.

    > >
    > > If this is true, and it probably is with response.redirect, then it is
    > > just as requested, as indeed the object is moved.
    > >

    >
    > After some testing it seems this behaviour is historical. I can only
    > reproduce it on IIS 5.0 when the original request is for an ASP page.
    > Otherwise the redirect is handled internally by IIS.
    >
    > > But I am using server.transfer extensively, and here, as the fysical
    > > .html page no longer exists, the 404.asp page is immediately invoked and
    > > with my server.transfer the .html page mimiques the real asp page and
    > > returnss a 200 status.
    > >
    > > I even have about 300 virtual .asp pages in a nonexistent directory on a
    > > server sharing one real asp page and invoked via this 404.asp code if
    > > theatdirectory name is detected. The different page names are resolved in
    > > the single page asp-vbs code to render the required html.
    > >
    > >
    > > > Instead of server.transfer you might try sending your 301 response
    > > > instead of using a server.transfer in the 404 page. However I can't
    > > > tell you whether search engines are intelligent enough to apply the
    > > > 301 response to the original request URL.
    > > >
    > > > A better solution would be to use an ISAPI filter to re-write the
    > > > requested URL.

    > >
    > > I hate that word "better".
    > >
    > > "Another" is fine:
    > >
    > > > Another solution would've have been to not have renamed the .html to
    > > > .asp and simply added .html to the list of file extensions handled as
    > > > an ASP script.

    > >
    > > Many of us [see below] have no access to the IIS settings they use,
    > > but if you have, it seems a nice move. "The best" comes to mind.
    > > ;-)
    > >
    > > > BTW, have you considered the impact on your system where previously
    > > > static and cachable html pages appear as dynamic content to the
    > > > client.

    > >
    > > I reckon most of our [this NG reader's] servers have less than a few
    > > thousands visits a day, so the impact is unimportant for most of us.
    > >

    >
    > Could be but equally I reckon the many maintain ASP sites that get way more,
    > for example intranet sites.
    >
    > > > Your site will not benefit from browser and proxy caches
    > > > anywhere as much as it was.

    > >
    > > Not in the case of server.transfer, as to the outside cyberworld the
    > > virtual page is just a page.
    > >

    >
    > Except that the static content handler in IIS will automatically generate
    > ETag and Last-Modified headers and respond with 304 when appropriate. Where
    > as ASP will only do that if you so code it to.
    >
    > This is particularly significant where with returning visitors, most of
    > which will be using IE and most of which will do so with default settings
    > which will typically ignore fresh content in the cache the first time URL is
    > fetched in a IE session.
    >
    > I stated in my orignal response its something to consider but you are
    > correct that there is a good chance this isn't significant.
    >
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    >
    c676228, Jan 30, 2008
    #12
  13. c676228

    c676228 Guest

    hi Anthony,

    you mentioned that:

    "Another solution would've have been to not have renamed the .html to .asp
    and simply added .html to the list of file extensions handled as an ASP
    script. "

    It sounds attractive to after I read your message carefully. So we don't
    need to worry about losing traffice anymore, same pages as before, only a bit
    confusing to programmer.
    But how to set it up in IIS? can you instruct?
    Thank you so much for your contribution.

    --
    Betty


    "Anthony Jones" wrote:

    > "c676228" <> wrote in message
    > news:...
    > > Hi all,
    > > Thanks for your input. I took Evertjan's suggestion and used the 404 page

    > to
    > > redirect all the *.html pages to *.asp page.
    > > and just changed server.transfer to Response.Redirect x to make it work
    > > correctly.
    > > somehow, server.transfer just doesn't work.
    > >
    > > thanks, thanks to Evertjan.
    > >

    >
    >
    > The problem you will have with a custom 404 page is that the request is
    > transfered to the 404 page via a 302 object moved response to the client.
    >
    > Instead of server.transfer you might try sending your 301 response instead
    > of using a server.transfer in the 404 page. However I can't tell you
    > whether search engines are intelligent enough to apply the 301 response to
    > the original request URL.
    >
    > A better solution would be to use an ISAPI filter to re-write the requested
    > URL.
    >
    > Another solution would've have been to not have renamed the .html to .asp
    > and simply added .html to the list of file extensions handled as an ASP
    > script.
    >
    > BTW, have you considered the impact on your system where previously static
    > and cachable html pages appear as dynamic content to the client. Your site
    > will not benefit from browser and proxy caches anywhere as much as it was.
    >
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    >
    c676228, Jan 30, 2008
    #13
  14. Anthony Jones wrote:
    > Another solution would've have been to not have renamed the .html to
    > .asp and simply added .html to the list of file extensions handled as
    > an ASP script.


    I wonder where I heard that before?

    Oh, yeah:
    >>> [In his initial response to the OP] Dave Anderson wrote:
    >>>> You can configure IIS to parse .html files the same as .asp.
    >>>> Alternatively, you can construct a custom 404 handler. Either
    >>>> should be capable of generating such a permanent redirect.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
    Dave Anderson, Jan 30, 2008
    #14
  15. c676228

    c676228 Guest

    Sorry, Dave. I messed up.
    It's your statement. I guess my eyes are just crooked.
    :=(
    --
    Betty


    "Dave Anderson" wrote:

    > Anthony Jones wrote:
    > > Another solution would've have been to not have renamed the .html to
    > > .asp and simply added .html to the list of file extensions handled as
    > > an ASP script.

    >
    > I wonder where I heard that before?
    >
    > Oh, yeah:
    > >>> [In his initial response to the OP] Dave Anderson wrote:
    > >>>> You can configure IIS to parse .html files the same as .asp.
    > >>>> Alternatively, you can construct a custom 404 handler. Either
    > >>>> should be capable of generating such a permanent redirect.

    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message. Use
    > of this email address implies consent to these terms.
    >
    >
    >
    c676228, Jan 30, 2008
    #15
  16. Hi Betty,

    Have you had a look at the other url redirection reference I provided
    previously:

    #Redirect to a Different URL using the Meta Tag "Refresh"
    http://webmaster.iu.edu/tool_guide_info/refresh_metatag.shtml

    Also, If you have thousands of html pages that need to redirect to their
    asp version ones, I think you may consider develop a custom ISAPI filter
    component and plug in your IIS server which intercept those html page
    requests and redirect to the ASP pages if necessary.

    #Redirecting ISAPI Filter
    http://www.15seconds.com/issue/961220.htm

    #HOWTO: Redirect the browser to a new URL based on Referer
    http://blogs.msdn.com/david.wang/archive/2005/12/06/HOWTO-Redirect-the-brows
    er-to-a-new-URL-based-on-Referer.aspx

    Also, if you search "ISAPI filter" and "url rewrite", you will find many
    existing commerical products that do such functions.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.






    --------------------
    >Subject: Re: file renamed after server upgrade
    >Date: Wed, 30 Jan 2008 12:29:01 -0800
    >
    >hi Anthony,
    >
    >you mentioned that:
    >
    >"Another solution would've have been to not have renamed the .html to .asp
    >and simply added .html to the list of file extensions handled as an ASP
    >script. "
    >
    >It sounds attractive to after I read your message carefully. So we don't
    >need to worry about losing traffice anymore, same pages as before, only a

    bit
    >confusing to programmer.
    >But how to set it up in IIS? can you instruct?
    >Thank you so much for your contribution.
    >
    >--
    >Betty
    >
    >
    >"Anthony Jones" wrote:
    >
    >> "c676228" <> wrote in message
    >> news:...
    >> > Hi all,
    >> > Thanks for your input. I took Evertjan's suggestion and used the 404

    page
    >> to
    >> > redirect all the *.html pages to *.asp page.
    >> > and just changed server.transfer to Response.Redirect x to make it work
    >> > correctly.
    >> > somehow, server.transfer just doesn't work.
    >> >
    >> > thanks, thanks to Evertjan.
    >> >

    >>
    >>
    >> The problem you will have with a custom 404 page is that the request is
    >> transfered to the 404 page via a 302 object moved response to the client.
    >>
    >> Instead of server.transfer you might try sending your 301 response

    instead
    >> of using a server.transfer in the 404 page. However I can't tell you
    >> whether search engines are intelligent enough to apply the 301 response

    to
    >> the original request URL.
    >>
    >> A better solution would be to use an ISAPI filter to re-write the

    requested
    >> URL.
    >>
    >> Another solution would've have been to not have renamed the .html to .asp
    >> and simply added .html to the list of file extensions handled as an ASP
    >> script.
    >>
    >> BTW, have you considered the impact on your system where previously

    static
    >> and cachable html pages appear as dynamic content to the client. Your

    site
    >> will not benefit from browser and proxy caches anywhere as much as it

    was.
    >>
    >>
    >> --
    >> Anthony Jones - MVP ASP/ASP.NET
    >>
    >>
    >>

    >
    Steven Cheng[MSFT], Jan 31, 2008
    #16
  17. "c676228" <> wrote in message
    news:...
    > Sorry, Dave. I messed up.
    > It's your statement. I guess my eyes are just crooked.
    > :=(



    It was so succinct we both missed it. ;)

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Jan 31, 2008
    #17
  18. "c676228" <> wrote in message
    news:...
    > hi Anthony,
    >
    > you mentioned that:
    >
    > "Another solution would've have been to not have renamed the .html to .asp
    > and simply added .html to the list of file extensions handled as an ASP
    > script. "
    >
    > It sounds attractive to after I read your message carefully. So we don't
    > need to worry about losing traffice anymore, same pages as before, only a

    bit
    > confusing to programmer.
    > But how to set it up in IIS? can you instruct?



    In IIS manager open the properties dialog on the web site.

    On the home directory tab click the Configuration... button under
    application setttings.

    On the App Mappings tab of the Application Configuration dialog you will see
    a list of file extensions and the dll they are mapped to.

    Note the executable path of the .asp extension (likely
    c:\windows\system32\intetsrc\asp.dll).

    Click Add and enter the same executable path in the Executable box.
    Enter .html in the Extension box
    Limit verbs to GET, HEAD, POST, TRACE
    Leave script engine check box ticked.

    OK out the dialogs

    Now .html are handled as .asp pages. Note that this also brings about the
    changes in the header behaviours I've mentioned before.

    If your site is already busy these changes will make it work significantly
    harder.

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Jan 31, 2008
    #18
  19. c676228

    c676228 Guest

    RE: redirect search engine highly ranked page

    Hi Steven,

    I looked at three options you mentioned here.
    for the first one, meta tag refresh, some articles mentioned that Search
    Engine doesn't like that because of some spammer use this to redirect a user
    to an irrelevant advertising site.
    Second option, I am not sure if I understand correctly. it seems that it's
    better solution for site restructure. We don't change site map, not change
    all *.htm files to *.asp, but the majority of them. So it is not the most
    proper solution in our case.

    Third opiotn, my problem is I am lack of knowledge about ISAPI. So it is
    kind of for me understand it.

    So now I am trying to make a decision from these contributoers' suggestions
    and comments. Which one is better? 404 custom error page redirect or set
    *.html run just like *.asp in IIS. I don't know at all.
    --
    Betty


    "Steven Cheng[MSFT]" wrote:

    > Hi Betty,
    >
    > If you want to keep those html files and let the html file do the
    > redirection, you can consider using the html meta tag to do the
    > redirection. Here is the example:
    >
    > #Redirect to a Different URL using the Meta Tag "Refresh"
    > http://webmaster.iu.edu/tool_guide_info/refresh_metatag.shtml
    >
    > Also, If you have thousands of html pages that need to redirect to their
    > asp version ones, I think you may consider develop a custom ISAPI filter
    > component and plug in your IIS server which intercept those html page
    > requests and redirect to the ASP pages if necessary.
    >
    > #Redirecting ISAPI Filter
    > http://www.15seconds.com/issue/961220.htm
    >
    > #HOWTO: Redirect the browser to a new URL based on Referer
    > http://blogs.msdn.com/david.wang/archive/2005/12/06/HOWTO-Redirect-the-brows
    > er-to-a-new-URL-based-on-Referer.aspx
    >
    > Also, if you search "ISAPI filter" and "url rewrite", you will find many
    > existing commerical products that do such functions.
    >
    > Hope this helps.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    > --------------------
    > >From: =?Utf-8?B?YzY3NjIyOA==?= <>
    > >References: <>
    > >Subject: RE: redirect search engine highly ranked page
    > >Date: Fri, 25 Jan 2008 14:55:01 -0800

    >
    > >
    > >Hi all,
    > >sorry I have to change the original subject since it doesn't make any sense
    > >--
    > >Betty
    > >
    > >
    > >"c676228" wrote:
    > >
    > >> Hi all,
    > >> Recently we are upgrading and merge our servers. We will move all *.html
    > >> hosted on a unix system to our windows server. During the migration, we

    > also
    > >> upgrade almost all of our code, say almost all html pages have been

    > renamed
    > >> to *.asp in order to handle those pages dynamically. But the issue here

    > is
    > >> our original *.html pages are ranked very highly by search engine. We

    > are not
    > >> sure what kind of redirect will be benign to search engines. And it

    > seems
    > >> that there is no one-page auto redirects solution like you can do with

    > unix
    > >> system (.htaccess file). On windows server, you have to redirect
    > >> individually. (man, think about if you have thousands of pages on a

    > site.)
    > >> I searched a bit, the following code seems to do the job:
    > >> put this code on the top of every page I wish to be redirected:
    > >> <%@ Language=VBScript %>
    > >> <%
    > >> Response.Status="301 Moved Permanently"
    > >> Response.AddHeader "Location", "http://www.example.com/yournewpage.asp"
    > >> %>
    > >>
    > >> am I right? But I cannot do this way in the original *.html file since

    > it is
    > >> not *.asp code. I have to use javascript to do dynamically redirect

    > anyway.
    > >> but what kind of redirect will be beneficial to Search Engine, the
    > >> instantaneous meta refresh redirect or the old page with all the old

    > content
    > >> removed and having a link towards the new page, which way is better,

    > one
    > >> click or no click to get to the new page.
    > >> --
    > >> Betty

    > >

    >
    >
    c676228, Feb 6, 2008
    #19
  20. RE: redirect search engine highly ranked page

    Thanks for your reply Betty,

    As for the two suggestion from the communtiy guys, I haven't used the "404
    page" approach so I can not give you much comments on it. For running
    "*.html" like asp in IIS, I think it is workable just like you configure
    html or other static page to be processed by ASP.NET runtime(here you
    configure it to be processed by ASP runtime extension), however, one
    drawback here is that all the html static files are processed by ASP
    extension and if you have some real "html" files(which are originally
    processed by IIS directly), you'll lose some performance.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: =?Utf-8?B?YzY3NjIyOA==?= <>
    >References: <>

    <>
    <L5#>
    >Subject: RE: redirect search engine highly ranked page
    >Date: Wed, 6 Feb 2008 13:58:04 -0800


    >
    >Hi Steven,
    >
    >I looked at three options you mentioned here.
    >for the first one, meta tag refresh, some articles mentioned that Search
    >Engine doesn't like that because of some spammer use this to redirect a

    user
    >to an irrelevant advertising site.
    >Second option, I am not sure if I understand correctly. it seems that it's
    >better solution for site restructure. We don't change site map, not change
    >all *.htm files to *.asp, but the majority of them. So it is not the most
    >proper solution in our case.
    >
    >Third opiotn, my problem is I am lack of knowledge about ISAPI. So it is
    >kind of for me understand it.
    >
    >So now I am trying to make a decision from these contributoers'

    suggestions
    >and comments. Which one is better? 404 custom error page redirect or set
    >*.html run just like *.asp in IIS. I don't know at all.
    >--
    >Betty
    >
    >
    >"Steven Cheng[MSFT]" wrote:
    >
    >> Hi Betty,
    >>
    >> If you want to keep those html files and let the html file do the
    >> redirection, you can consider using the html meta tag to do the
    >> redirection. Here is the example:
    >>
    >> #Redirect to a Different URL using the Meta Tag "Refresh"
    >> http://webmaster.iu.edu/tool_guide_info/refresh_metatag.shtml
    >>
    >> Also, If you have thousands of html pages that need to redirect to their
    >> asp version ones, I think you may consider develop a custom ISAPI filter
    >> component and plug in your IIS server which intercept those html page
    >> requests and redirect to the ASP pages if necessary.
    >>
    >> #Redirecting ISAPI Filter
    >> http://www.15seconds.com/issue/961220.htm
    >>
    >> #HOWTO: Redirect the browser to a new URL based on Referer
    >>

    http://blogs.msdn.com/david.wang/archive/2005/12/06/HOWTO-Redirect-the-brows
    >> er-to-a-new-URL-based-on-Referer.aspx
    >>
    >> Also, if you search "ISAPI filter" and "url rewrite", you will find many
    >> existing commerical products that do such functions.
    >>
    >> Hope this helps.
    >>
    >> Sincerely,
    >>
    >> Steven Cheng
    >>
    >> Microsoft MSDN Online Support Lead
    >>
    >>
    >>
    >> This posting is provided "AS IS" with no warranties, and confers no

    rights.
    >>
    >>
    >> --------------------
    >> >From: =?Utf-8?B?YzY3NjIyOA==?= <>
    >> >References: <>
    >> >Subject: RE: redirect search engine highly ranked page
    >> >Date: Fri, 25 Jan 2008 14:55:01 -0800

    >>
    >> >
    >> >Hi all,
    >> >sorry I have to change the original subject since it doesn't make any

    sense
    >> >--
    >> >Betty
    >> >
    >> >
    >> >"c676228" wrote:
    >> >
    >> >> Hi all,
    >> >> Recently we are upgrading and merge our servers. We will move all

    *.html
    >> >> hosted on a unix system to our windows server. During the migration,

    we
    >> also
    >> >> upgrade almost all of our code, say almost all html pages have been

    >> renamed
    >> >> to *.asp in order to handle those pages dynamically. But the issue

    here
    >> is
    >> >> our original *.html pages are ranked very highly by search engine. We

    >> are not
    >> >> sure what kind of redirect will be benign to search engines. And it

    >> seems
    >> >> that there is no one-page auto redirects solution like you can do

    with
    >> unix
    >> >> system (.htaccess file). On windows server, you have to redirect
    >> >> individually. (man, think about if you have thousands of pages on a

    >> site.)
    >> >> I searched a bit, the following code seems to do the job:
    >> >> put this code on the top of every page I wish to be redirected:
    >> >> <%@ Language=VBScript %>
    >> >> <%
    >> >> Response.Status="301 Moved Permanently"
    >> >> Response.AddHeader "Location",

    "http://www.example.com/yournewpage.asp"
    >> >> %>
    >> >>
    >> >> am I right? But I cannot do this way in the original *.html file

    since
    >> it is
    >> >> not *.asp code. I have to use javascript to do dynamically redirect

    >> anyway.
    >> >> but what kind of redirect will be beneficial to Search Engine, the
    >> >> instantaneous meta refresh redirect or the old page with all the old

    >> content
    >> >> removed and having a link towards the new page, which way is better,

    >> one
    >> >> click or no click to get to the new page.
    >> >> --
    >> >> Betty
    >> >

    >>
    >>

    >
    Steven Cheng[MSFT], Feb 7, 2008
    #20
    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. Trint Smith
    Replies:
    2
    Views:
    718
    Ravi Sankar
    Aug 25, 2003
  2. ultr
    Replies:
    2
    Views:
    530
  3. jamessmb
    Replies:
    3
    Views:
    379
    Keith Patrick
    Jan 17, 2006
  4. Amarpal
    Replies:
    2
    Views:
    842
    harsha
    Dec 31, 2011
  5. Replies:
    5
    Views:
    280
    Dr.Ruud
    Jul 5, 2006
Loading...

Share This Page