thinkphp Routing Usage

Source: Internet
Author: User

' url_router_on '   true// Open Route

2. Defining routes

1 Array (2         '/^c_ (\d+) $/' + ' index/list/index?id=:1 '3 ),

3.Apache Remove index.php

1, httpd.conf configuration file loaded mod_rewrite.so module//in Apache to configure

# LoadModule rewrite_module modules/mod_rewrite.so to remove the siren from the front.

2, allowoverride none change none to all//in Apache configuration (note that the allowoverride in other places are all set to all)

<directory "D:/server/apache/cgi-bin" >allowoverride None  change   allowoverride alloptions Noneorder Allow,denyallowfrom all </Directory>

3. Make sure the Url_model is set to 2 and write in the project configuration file.

return Array (   ' url_model ' = ' 2 ',);

4.. htaccess files must be placed in the following directory

<ifmodule mod_rewrite.c>%{request_filename}-%{request_filename}-^ (. *) $ index.php/$1 [Qsa,pt,L]</IfModule>

thinkphp Routing Usage

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.