thinkphp group Problem Help

Source: Internet
Author: User
This post was last edited by Xiongmzh on 2013-11-20 15:24:09

My group: A B C
Default group: A
B.xxx.com, point to Group B,. htaccess as follows;
Options +followsymlinks
 
  
   
  rewriteengine onrewritecond%{request_filename}!-drewritecond%{request_ FILENAME}!-frewriterule ^ (. *) $ index.php/b/$1 [qsa,pt,l]
 
  

Now, when accessing http://b.xxx.com/, it is the index method in the Indexaction controller under the A packet (but the URL in the address bar has not changed), for help, has not figured out what the principle, Why not perform the indexaction controller under Group B


Reply to discussion (solution)

Well, I know what's going on, and I didn't do it at all. Rewriterule ^ (. *) $ index.php/b/$1 [qsa,pt,l]

But when I visit Http://b.xxx.com/index is also performing a group of indexaction, which I can't think of.

When accessing Http://b.xxx.com/index, the server is exported in the portal file, and no redirect_status is found, indicating that no rewrite succeeded

http://b.xxx.com/
Http://b.xxx.com/Index
Http://b.xxx.com/Index/index
Http://b.xxx.com/Index/index.html
These did not rewrite the success, the first unsuccessful, but also understandable, but the No. 234 one is baffled, what is more incomprehensible is that the following can rewrite success:
Http://b.xxx.com/Other
Http://b.xxx.com/Other/index
Http://b.xxx.com/Other/index.html

  • 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.