| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#11
| |||
| |||
| Anthony Jones wrote on 29 jan 2008 in microsoft.public.inetserver.asp.general: > "c676228" <betty@newsgroup.nospam> 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) |
|
#12
| |||
| |||
| "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message news:Xns9A3482280E9Aeejj99@194.109.133.242... > Anthony Jones wrote on 29 jan 2008 in > microsoft.public.inetserver.asp.general: > > > "c676228" <betty@newsgroup.nospam> 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 |
|
#13
| |||
| |||
| 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." <exjxw.hannivoort@interxnl.net> wrote in message > news:Xns9A3482280E9Aeejj99@194.109.133.242... > > Anthony Jones wrote on 29 jan 2008 in > > microsoft.public.inetserver.asp.general: > > > > > "c676228" <betty@newsgroup.nospam> 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 > > > |
|
#14
| |||
| |||
| 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" <betty@newsgroup.nospam> 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 > > > |
|
#15
| |||
| |||
| 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. |
|
#16
| |||
| |||
| 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. > > > |
|
#17
| |||
| |||
| 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_i..._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/arc...rect-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" <betty@newsgroup.nospam> 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 >> >> >> > |
|
#18
| |||
| |||
| "c676228" <betty@newsgroup.nospam> 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 |
|
#19
| |||
| |||
| "c676228" <betty@newsgroup.nospam> 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 |
|
#20
| |||
| |||
| 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_i..._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/arc...rect-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==?= <betty@newsgroup.nospam> > >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 > > > > |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.