[英]Google App Engine problem. URL grouping not working
My app was working fine in php55 using the below app.yaml settings to grouped URLs.我的应用程序在 php55 中运行良好,使用下面的 app.yaml 设置来分组 URL。 EG /api/manage, /api/edit, api/user/add should all be forwarded to /api/api.php but stopped working when upgraded to php72.
EG /api/manage, /api/edit, api/user/add 应该都转发到 /api/api.php 但升级到 php72 时停止工作。
Fine below the app.yaml conifig for both php55 and php72 for your help.在 app.yaml 配置下为 php55 和 php72 提供帮助。
Configuration for php55 php55的配置
service: default
runtime: php55
handlers:
- url: /api((/$)|(/[^/]+(/$)?)*)
script: /api/api.php
secure: always
Configuration for php72 php72的配置
service: default
runtime: php72
handlers:
- url: /api/(.*?)/(.*)
script: /api/api.php
secure: always
Thanks in advance.提前致谢。
For the 2nd generation runtimes (including PHP 7+) you no longer use the script
element to route traffic ( documentation ).对于第二代运行时(包括 PHP 7+),您不再使用
script
元素来路由流量( 文档)。 You have to use a language idiomatic web/routing framework (eg Flask in Python, a front controller for PHP).您必须使用语言惯用的网络/路由框架(例如 Python 中的 Flask,PHP 的前 controller )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.