Now the blog on step1.cn has been completely transferred to a new location, so the blog files on the original site have been deleted.
I didn't plan to close it so early, but considering that switching can only be done in the middle of the night, I can only switch over the weekend, but I may not have time next weekend, so I decided to switch right away.
In order to retain the URL rewriting function required by step 1. cn, I specifically related to URL rewriting in dottext. Code This feature is extended because my blog address needs to be perfectly migrated.
Httphandler Original
Direct ,
Factory ,
Page ,
Redirect Added a moveTo rewrite type. When using this type, it is actually switched permanently to the new address by specifying the 301 status of the URL. The code is omitted as follows:
Case Handlertype. moveTo:
Context. response. Status = " 301 moved permanently " ;
Context. response. addheader ( " Location " , RegEx. Replace (url1, items [I]. pattern, items [I]. pagelocation, regexoptions. ignorecase ));
Context. response. End ();
Break ;
However, I only need to add the following entries in Web. config:
< Httphandler Pattern = "^/Archive/(\ D {4})/(\ D {1, 2}) \. aspx $" Handlertype = "MoveTo" Pagelocation = "Http://step1.cnblogs.com/archive/4241/4102.html" />
This will be able to automatically and permanently turn the original web site http://www.step1.cn/archive/2006/06.aspx to http://step1.cnblogs.com/archive/2006/06.html, so as to ensure the smooth transfer of my blog, however, because of the differences in the Article ID numbers between the two websites, the two articles cannot be transferred directly, so I moved the article content page to the list of all articles on that day.
During website switching, the kml Column cannot be accessed for more than an hour due to URL rewriting settings.