亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

rewrite - How does apache server work?
黃舟
黃舟 2017-05-16 17:03:29
0
1
653

I am using apache + phalcon (PHP framework) and configured the routing rules of the framework. When accessing, it can be accessed directly through the folder path or through routing rule matching. I want to understand how Apache handles these requests. What is the underlying implementation principle?

黃舟
黃舟

人生最曼妙的風(fēng)景,竟是內(nèi)心的淡定與從容!

reply all(1)
為情所困

When accessing, it can be accessed directly through the folder path or through routing rule matching. I would like to ask in what order does apache distribute requests?

In these two cases, there is no problem of distributing requests, because these are two different requests in themselves.

For this request of routing rules, Apache will first search for .htaccess 配置文件,找到之后讀取其中的信息。在本項(xiàng)目中, .htaccess中寫(xiě)的應(yīng)該是非靜態(tài)文件全部指向index.php in the project root directory.

Back to your question:

  1. Direct access through the folder path indicates that Apache has found this "static file", which is the target php file.

  2. Accessed through the URL matching the routing rules, Apache will find that the static file does not exist, and will point the request to index.php. At this time, the request will be taken over by the PHP code to match the routing rules and process the page.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template