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]