Website revision page How to do 301 redirect Jump

Source: Internet
Author: User

My site was built with the WordPress system, and later because of the garbage review, security and functional limitations, and so on, I use the cicada to know the system to do a re-made, the theme interface or imitation of the WP theme. But the new station on-line, the problem comes, because the two construction station system of the URL design is different, resulting in the old station in addition to the first page of all pages are inaccessible, with the new address re-edit the release, and not conducive to SEO optimization. So finally I thought of 301 jump.


What is 301 redirect

301 Redirect (or called 301 jump) is the user or search engine when the spider makes an access request to the site server, the service returns the HTTP data stream header part of the status code of one, indicating that this site is permanently transferred to another address.


The difference between 301 and 302

You may also have heard that 302 jumps, 301 and 302 are both HTTP status encoding, which means that a URL has shifted, except that 301 is a permanent jump, and 302 is a temporary jump. From the SEO point of view, we are advocating the use of 301 jump.


What scenario do you want to do 301 jump?


1. The redundant name points to the same site. For example, with WWW and two addresses without WWW, we usually point the root domain without www to the two level domain name of www. Because in search engine view, this is two different sites.

2. Website revision, address changed. Just like the situation I encountered, I need to jump to the new URL 301.


How to do 301 jump

I take my own website as an example, the Web server uses Apache, for example, I would like to change the URL www.domain.com/100.html to the new URL wwww.domain.com/life-100.html, You can add the following code to the Apache configuration file:


Options +followsymlinks    rewriteengine on    rewriterule ^/100.html$/life-100.html[nc,l,r=301]


Save and restart the Apache service. When we access the www.domain.com/100.html address in the browser, the page content jumps to wwww.domain.com/life-100.html.


Again such as common will not take the root domain name with www to the domain name with www, method with the above, code into the following:


Options +followsymlinks    rewriteengine on    rewritecond%{http_host} ^domain.com [NC]    rewriterule ^ (. *) $ http://www.domain.com/$1 [l,r=301]


Don't forget that you need to restart the Web service to take effect.


Summary

This article and everyone to share the relevant knowledge of 301 jump and how to do the site page 301 redirect operation. If you have any questions or other methods of operation, welcome to share with everyone, we learn together and progress together.

Website revision page How to do 301 redirect Jump

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.