Phalcon2 projects created through the Phalcon tools tool cannot access other paths

Source: Internet
Author: User

Environment

Linux overlords 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC x86_64 x86_64 x86_64 gnu/linux

PHP 5.6.16 (CLI) (Built:dec 17 2015 10:06:34)

Nginx version:nginx/1.9.9

Problem description

In the process of learning Phalcon environment has been configured, pseudo-static is not a problem, but found that phalcon project projectName can access the default control, such as the http://localhost/ creation of their own TestController.php http://localhost/test is not accessible;

Please play Phalcon's hero's advice

Solution Solutions

Using Nginx configuration rules $_SERVER['QUERY_STRING'] ; At first, using $_SERVER['REQUEST_URI'] pseudo-static jumps does not pass

Reply content:

Environment

Linux overlords 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC x86_64 x86_64 x86_64 gnu/linux

PHP 5.6.16 (CLI) (Built:dec 17 2015 10:06:34)

Nginx version:nginx/1.9.9

Problem description

In the process of learning Phalcon environment has been configured, pseudo-static is not a problem, but found that phalcon project projectName can access the default control, such as the http://localhost/ creation of their own TestController.php http://localhost/test is not accessible;

Please play Phalcon's hero's advice

Solution Solutions

Using Nginx configuration rules $_SERVER['QUERY_STRING'] ; At first, using $_SERVER['REQUEST_URI'] pseudo-static jumps does not pass

The correct explanation is that the default adoption of the Phalcon QUERY_STRING can be specified REQUEST_URI in the routing configuration
It ' s supported:https://docs.phalconphp.com/en/latest/reference/routing.html#uri-sources

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