Seo-301 permanent redirection

Source: Internet
Author: User

My friend's website did not notice that many product names were wrong when releasing the product, and the word of the keyword was wrong. And now the website is ranked. In addition, I found that many links correspond to the same page. What should I do? Naturally, it is 301 redirection. The problem is that it would be too troublesome to manually write commands. What else do you need to modify the statistics? The answer is a regular expression. But do not abuse it.

If you just want to remove the directory from the URL, because there is a URL with a directory and no directory in the website, but it actually corresponds to the same page, you only need a redirect command:

Redirect/service http://foo2.example.com/service

If a word is wrong in the URL, or the singular or plural is wrong. Then you need the redirectmatch command (replace ABC with xyz, the key is the confirmation of the regular expression, especially when the replaced target string and source string are sub-string relationships, what should I consider when writing a regular expression ):

Redirectmatch 301 (. *) ABC ([. |-] +) (. *) HTML $ http://www.abc.com $1 xyzs $2 $3 html

 

Related Article

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.