The blog on step1.cn has been completely closed.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.