Which of the following experts helped me send a. htaccess domain name to a file? Why not?

Source: Internet
Author: User
Who will send a. htaccess domain name to the file for me? Why not? RewriteEngineOnRewriteCond % {HTTP_HOST} ^ www.xxx.com $ [OR] RewriteCond % {HTTP_HOST} ^ xxx.com $ & nbsp; RewriteRule ^? $ & Quot; www. example. co. who will send a. htaccess domain name to the file? Why not?
RewriteEngine On
RewriteCond % {HTTP_HOST} ^ www.xxx.com $ [OR] RewriteCond % {HTTP_HOST} ^ xxx.com $
RewriteRule ^ /? $ "Http \: \/www \. example \. com" [R = 301, L]

Who will send a. htaccess domain name to the file for me? Why not?

At the same time, five domain names are bound to one space: 1.www.example.com, 2.www.xxx.com, 3.xxx.com, 4.bbs.example.com, and 5.news.example.com;
Functions to be implemented:
When www.xxx.com and xxx.com are used for access, the system automatically redirects to www.example.com (the domain name in the address bar is displayed as www.example.com) and points to index. php on the spatial homepage.
When bbs.example.com is accessed, it directs to the subpage www.example.com/bbs. (the domain name in the address bar is displayed as bbs.example.com ).
When news.example.com is accessed, it directs to the subpage www.example.com/news. (the domain name in the address bar is displayed as news.example.com ).



------ Solution --------------------
Domain name jump has not been tried... Didn't you enable. htaccess directory identification?
This can be used for subpage jump
RewriteCond % {HTTP_HOST} ^ bbs.example.com $
RewriteCond % {REQUEST_URI }! ^/Bbs/
RewriteCond % {REQUEST_FILENAME }! -F
RewriteCond % {REQUEST_FILENAME }! -D
RewriteRule ^ (. *) $/bbs/$1
RewriteCond % {HTTP_HOST} ^ bbs.example.com $
RewriteRule ^ (/)? $ Bbs/index. php [L]
------ Solution --------------------
Domain name redirection? Is it a 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.