是什么在.htaccess中的重写规则转换为一个app.yaml文件?重写、转换为、规则、文件

2023-09-02 11:27:21 作者:奏一曲、悲欢

我要如何转换这种的.htaccess 文件的的app.yaml 文件?

How do I convert this .htaccess file to an app.yaml file?

下面是的.htaccess 文件:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(?!.*?public).* index.php [QSA,L]

我需要这样做运行使用PHP在谷歌应用程序引擎的应用程序。

I need to do this to run an app using PHP on Google App Engine.

我要问这个问题的原因,是因为谷歌特别建议在自己的官方文档存储在Git的枢纽code例如所谓的编辑博士。该博士编辑code例子有一个的.htaccess 文件,但没有的app.yaml 文件。而且,在 READ ME 文件,用于设置应用程序的第一步,是创建谷歌的App Engine应用程序。所以我想谷歌已经提供了影射它可以运行在谷歌App Engine的一个code的例子,但它不会。

The reason I'm asking this question, is because Google specifically recommends a code example in their official documentation that is stored in Git Hub called Dr Edit. The Dr Edit code example has a .htaccess file, but no app.yaml file. And, in the READ ME file, the very first step for setting up the application, is to create a Google App Engine application. So I guess Google has provided a code example that insinuates it will run on Google App Engine, but it won't.

据说谷歌正在监视堆栈溢出对有关GAE的问题,所以我希望他们读这一点。

Supposedly Google is monitoring Stack Overflow for issues related to GAE, so I hope they read this.

推荐答案

下面是关于如何的模拟URL重写$ _GET ['Q']路由一个PHP应用程序引擎的应用程序,如果这是有帮助的。

Here is information about how to simulate Apache mod_rewrite $_GET['q'] routing for a PHP App Engine app, in case that's helpful.