简体   繁体   English

谷歌应用引擎问题。 URL 分组不起作用

[英]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.

相关问题 任务队列不工作谷歌应用引擎 - taskqueue is not working google app engine Google Cloud App Engine 中的 Angular 7 路由不起作用 - Angular 7 Routing in Google Cloud App Engine not working tensorflow_hub 不适用于谷歌应用引擎 - tensorflow_hub not working on google app engine php72 动态 url 前端路由 controller 通过入口点标准不工作 Google App Engine [GAE] - php72 dynamic url routing with front controller via entry point standard not working Google App Engine [GAE] Google App Engine:在找到合适的 Handler 时忽略 URL Case - Google App Engine: Ignore URL Case when finding appropriate Handler 无法从 Google App Engine 上的 URL 连接到运行 Strapi 的进程 - Cannot connect to the process running Strapi from URL on Google App Engine 谷歌云应用引擎部署的最新版本是否有 URL? - Is there a URL for the latest version of a google cloud app engine deploy? GCS 使用 python 2.7 和 google app engine 生成符号 url - GCS generate sign url with python 2.7 and google app engine 谷歌应用引擎 JDO 3 - Google App Engine JDO 3 是否有用于 Google App Engine(Java 语言)的 HTML 模板引擎? - Is there a HTML templating engine for Google App Engine (in Java)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM