How to turn multiple domain names to the same domain name (SEO, PR value transfer, URL conversion)

Source: Internet
Author: User
Tags cpanel subdomain name to domain

For Seo, PR value transfer, and URL conversion purposes, we need to use301 redirectionIt usually includes domain name-to-domain name, directory-to-directory, and redirection of an independent website address to another independent website address. InBluehostVirtual HostFor 301 redirection, there are two most common methods:
1. Edit. htaccess directly.
2. Set it with cpanel.
Both are actually modifying the file. htaccess, but the former is manually edited, and the latter is completed by cpanel. Using cpanel is quite simple. log on to your cpanel (you can select Simplified Chinese for the bluehost virtual host)-> domain-> redirects, and select the appropriate options to complete the settings. This is not discussed here. The following describes how to directly edit. htaccess.
Note: Before setting 301 redirection, you must back up the. htaccess file in the corresponding directory.
1. Redirect wovane.comWww.Wovane. Com
This type of redirection aims to make the domain name unique, which must be done by the website Seo.Www.wovane.comTo wovane.com, it is also for the same reason, but the form is different.
Open the. htaccess file and add the following rules. (The following rules apply to the primary domain name. The subdomain name must be modified)

Rewriteengine on
Rewritecond % {http_host }! ^Www.wovane.com $[Nc]
Rewriterule ^ (. *) $Http://www.wovane.com/#1[L, r = 301]

2. RedirectionWww.wovane.comTo domain.com

Rewriteengine on
Rewritecond % {http_host }! ^ Wovane.com $ [Nc]
Rewriterule ^ (. *) $Http://wovane.com/#1[L, r = 301]

3. Redirect olddwovane.comWww.newwovane.com

Rewriteengine on
Rewritecond % {http_host }! Olddomain.com $ [Nc]
Rewriterule ^ (. *) $Http://www.newwovane.com/#1[L, r = 301]

4. Redirect oldwovane.com to newwovane.com

Rewriteengine on
Rewritebase/
Rewritecond % {http_host }! Oldwovane.com $ [Nc]
Rewriterule ^ (. *) $Http://newwovane.com/#1[L, r = 301]

5. Redirect wovane.com/file/file.php to otherwovane.com/otherfile/other.php

rewritecond % {http_host} ^ www.wovane.com $
rewriterule ^ file/file. PHP $ http://www.otherwovane.com/otherfile/other.php [R = 301, l]

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.