file renamed after server upgrade

file renamed after server upgrade

am 25.01.2008 23:34:01 von betty

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

RE: redirect search engine highly ranked page

am 25.01.2008 23:55:01 von betty

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

Re: file renamed after server upgrade

am 26.01.2008 04:48:42 von Adrienne Boswell

Gazing into my crystal ball I observed =?Utf-8?B?YzY3NjIyOA==?=
writing in
news:2980B9D1-792F-47ED-9F5F-0ECF898DBB16@microsoft.com:

> 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

Re: file renamed after server upgrade

am 26.01.2008 07:56:22 von Dave Anderson

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



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

Re: file renamed after server upgrade

am 26.01.2008 13:49:20 von exjxw.hannivoort

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

This is the 404 error page of www.example.com

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

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)

RE: redirect search engine highly ranked page

am 28.01.2008 04:58:05 von stcheng

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

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-Re direct-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: <2980B9D1-792F-47ED-9F5F-0ECF898DBB16@microsoft.com>
>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
>

Re: file renamed after server upgrade

am 28.01.2008 17:14:00 von Daniel Crichton

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 %>
>
> This is the 404 error page of www.example.com
> ==================================

> 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

Re: file renamed after server upgrade

am 28.01.2008 17:40:01 von exjxw.hannivoort

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 %>
>>
>> This is the 404 error page of www.example.com
>> ==================================
>
>> 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)

Re: file renamed after server upgrade

am 29.01.2008 00:57:01 von betty

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
> %>
>
> This is the 404 error page of www.example.com
>
> ==================================
>
> 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)
>

Re: file renamed after server upgrade

am 29.01.2008 10:39:19 von Anthony Jones

"c676228" wrote in message
news:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
> 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

Re: file renamed after server upgrade

am 29.01.2008 12:47:39 von exjxw.hannivoort

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

> "c676228" wrote in message
> news:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
>> 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)

Re: file renamed after server upgrade

am 29.01.2008 23:13:26 von Anthony Jones

"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:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
> >> 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

Re: file renamed after server upgrade

am 30.01.2008 20:33:01 von betty

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:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
> > >> 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
>
>
>

Re: file renamed after server upgrade

am 30.01.2008 21:29:01 von betty

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:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
> > 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
>
>
>

Re: file renamed after server upgrade

am 30.01.2008 21:39:26 von Dave Anderson

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.

Re: file renamed after server upgrade

am 30.01.2008 21:50:02 von betty

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

Re: file renamed after server upgrade

am 31.01.2008 07:23:24 von stcheng

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

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-Re direct-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:F48CAD57-72BB-4270-BB99-17EB0F24DB43@microsoft.com...
>> > 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
>>
>>
>>
>

Re: file renamed after server upgrade

am 31.01.2008 09:15:55 von Anthony Jones

"c676228" wrote in message
news:8747777E-B32A-44B3-8104-80CB61C0545A@microsoft.com...
> 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

Re: file renamed after server upgrade

am 31.01.2008 09:30:08 von Anthony Jones

"c676228" wrote in message
news:7E28174E-CD9D-4E70-8EE0-B44EFF6DB4F6@microsoft.com...
> 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