How to write a. htaccess domain name jump file? Php space, supports pseudo-static hop transfer. for example, a space supporting php is bound with three domain names at the same time: www. aaa. comhttp: // www.xxx.combbs.aaa.com; when www.xxx.com is used for access, it is automatically redirected to www.aaa.com (the domain name in the address bar is displayed as www.aaa.com). how do I write an htaccess domain name 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]
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.