| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| Gazing into my crystal ball I observed =?Utf-8?B?YzY3NjIyOA==?= <betty@newsgroup.nospam> 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 |
|
#4
| |||
| |||
| "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. |
|
#5
| |||
| |||
| 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) |
|
#6
| |||
| |||
| 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 > |
|
#7
| |||
| |||
| 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 |
|
#8
| |||
| |||
| 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) |
|
#9
| |||
| |||
| 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) > |
|
#10
| |||
| |||
| "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 |
![]() |
| 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.