In the SEO process, 301 turns often play a certain role. Now let's take a look at how to set the 301 redirection in Asp.net.
A simple shift in Asp.net
Response. Redirect ("http://www.0701yt.net"); // create a 302 redirection to the http://www.0701yt.net
Although simple and clear, the 302 redirection (which can be recognized by Google) is very unfriendly to search engines
Only think of it as a temporary connection transfer information, which means its goal can be changed.
Each request. When you need to switch, you need to pass the PR value, increase the search engine friendliness, and drag the old website to the new website, you need to use the 301 redirection. The following is a simple code snippet.
Response. Clear ();
Response. statuscode = 301;
Response. appendheader ("location", "http://www.0701yt.net ");
Response. End ();
301 redirection (or 301 redirection, 301 redirection) is used when the user or search engine requests to the website server.
When a browser request is sent, one of the status codes in the header information (header) returned by the server indicates that the webpage is permanently transferred to another address.
The function is as follows: