Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
google应用程序引擎将url index.php更改为index.html或仅更改为index_Php_Google App Engine_Url Rewriting_Yaml - Fatal编程技术网

google应用程序引擎将url index.php更改为index.html或仅更改为index

google应用程序引擎将url index.php更改为index.html或仅更改为index,php,google-app-engine,url-rewriting,yaml,Php,Google App Engine,Url Rewriting,Yaml,如何为app engine设置yaml文件以执行以下操作。我在谷歌应用程序引擎上使用php 当您访问以下url时 例如domain.com/index.php 它显示在url框中 domain.com/index.html 或 domain.com/index要更改“url框”,需要重定向。您不需要在yaml文件中这样做,而是在处理程序中这样做。我认为您想要做的是使用一个名为index.php的php文件来服务您的内容,以及一个独立于此的URL 在应用程序引擎中,您实际上不需要做任何特殊的事情来

如何为app engine设置yaml文件以执行以下操作。我在谷歌应用程序引擎上使用php

当您访问以下url时

例如domain.com/index.php

它显示在url框中 domain.com/index.html 或
domain.com/index

要更改“url框”,需要重定向。您不需要在yaml文件中这样做,而是在处理程序中这样做。

我认为您想要做的是使用一个名为index.php的php文件来服务您的内容,以及一个独立于此的URL

在应用程序引擎中,您实际上不需要做任何特殊的事情来实现这种效果。在阅读App Engine教程()时,您会注意到App.yaml文件允许您配置哪些URL映射到哪些文件。在该示例中,所有URL都映射到helloworld.php:

handlers:
- url: /.*
  script: helloworld.php
但是您也可以使特定的URL映射到特定的php文件。有关将domain.com/index路由到index.php的示例:

handlers:
- url: /index
  script: index.php