How to deal with multiple domain names pointing to the same domain name-php Tutorial

Source: Internet
Author: User
When multiple domain names direct to the same domain name, it is similar to entering kaixin.com to automatically jump to renren. comOptions + FollowSymLinksRewriteEngineonRewriteCond $1! ^ (Index. php | images | style | js | system | Scripts | img | php | robots.txt) RewriteCond % {HTTP multiple domain names point to the same domain name
Enter kaixin.com to automatically jump to renren.com.
Options + FollowSymLinks
RewriteEngine on
RewriteCond $1! ^ (Index \. php | images | style | js | system | Scripts | img | php | robots \. txt)
RewriteCond % {HTTP_HOST} ^ example.com $ [NC]
RewriteRule ^ (. *) $ http://www.123.com/#1 [R = 301, L]
RewriteCond % {http_host} ^ example.net [NC]
RewriteRule ^ (. *) $ http://www.123.com/#1 [R = 301, L]
RewriteRule ^ (. *) $ index. php/$1 [L]

The above code will automatically jump to 123.comwhen example.com and example.net are entered. do you have any questions? The CI framework is used.

------ Solution --------------------
Come and answer, and I 'd like to know.
------ Solution --------------------
You just need to map the domain name provider to you.

Do not build a car behind closed doors!
------ Solution --------------------
I still cannot understand a lot of code.
Can this problem be solved?

------ Solution --------------------
301 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.