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 step1.cn, I specifically strip out the URL rewriting code in dottext for reservation, and because my blog address needs to be perfectly migrated, therefore, this function is extended in
HttphandlerOriginal
Direct,
Factory,
Page,
RedirectAdded 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, but because of the differences between the two website Article idnumber, the two articles cannot be transferred directly between them, so I transferred the article content page to the list of all articles on that day.
During the website switching process, due to the URL rewriting setting problem, the kml Column cannot be accessed for more than an hour.