How to write a. htaccess domain name jump file

Source: Internet
Author: User
How to write a. htaccess domain name jump file? Php space, supports pseudo-static hop transfer. for example, a php space can be bound with three domain names www.aaa.comwww.xxx.combbs.aaa.com at the same time. when www.xxx.com is used for access, it automatically jumps to www.aaa.com) point to index on the spatial homepage. php. When bbs.aaa.com comes to the. htaccess domain name, how can I write a jump file?
Php space, supports pseudo-static skip
For example, a space supporting php is bound with three domain names at the same time.
Www.aaa.com
Http://www.xxx.com
Bbs.aaa.com;

When www.xxx.com is used for access, the system automatically jumps to www.aaa.com (the domain name in the address bar is displayed as www.aaa.com) and points to index. php on the spatial homepage.

When bbs.aaa.com is used for access, it points to the subpage of www.aaa.com/bbs.php (the domain name in the address bar is displayed as bbs.aaa.com ).

------ Solution --------------------
Just add a rewrite, and then rewrite bbs.aaa.com to www.aaa.com/bbs.php.
------ Solution --------------------
You may understand the statements in htaccess and find a solution.
RewriteEngine on
RewriteCond $1! ^ (Index \. php | images | robots \. txt | user_guide /)
RewriteRule ^ (. *) $/index. php/$1 [L]
------ Solution --------------------
# Use PHP5 Single php. ini as default
AddHandler application/x-httpd-php5s. php
RewriteEngine On
RewriteCond % {HTTP_HOST} ^ ganfulejiaonang \. xyz315 \. com $ [OR]
RewriteCond % {HTTP_HOST} ^ www \. ganfulejiaonang \. xyz315 \. com $
RewriteRule ^ /? $ "Http \: \/ganfulejiaonang \. xyz120 \. net \/" [R = 301, L]

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.