Note: Be sure to back up the. htaccess file in the corresponding directory before you set 301 redirection.
1.301 redirect b.org to www.b.org
This redirect is designed to make the domain name unique, is the website SEO must do, the back redirects www.b.org to b.org is also for the same reason, but the form is different.
Open the. htaccess file and add the following rules. (The following rule is for the primary domain name, and the subdomain is to be modified)
| The code is as follows |
Copy Code |
|
Rewriteengine on
Rewritecond%{http_host}!^www.b.org$ [NC]
Rewriterule ^.$ http://www.b.org/$1 [l,r=301] |
2.301 redirect www.b.org to b.org
| The code is as follows |
Copy Code |
|
Rewriteengine on
Rewritecond%{http_host}!^b.org$ [NC]
Rewriterule ^.$ http://b.org/$1 [l,r=301] |
3.301 redirect c.com to www.a.com
| The code is as follows |
Copy Code |
|
Rewriteengine on
Rewritecond%{http_host}!c.com$ [NC]
Rewriterule ^.$ http://www.a.com/$1 [l,r=301] |
4.301 redirect c.com to A.com
| code is as follows |
copy code |
|
Rewriteengine On
Rewritebase/rewritecond%{http_host}!c.com$ [NC]
Rewriterule ^.$ http://a.com/$1 [l,r=301]
5.3 01 redirect domain.com/file/file.php to oo.com/otherfile/other.php
Rewritecond%{http_host} ^www.domain.com$
Rewriterule ^file/file.php$ http://www.oo.com/otherfile/other.php [r=301,l] |