我有一个php应用程序,用于应用引擎。我的app.yaml文件如下:
application: myproject-testing-112
version: 1
runtime: php
api_version: 1
threadsafe: yes
handlers:
- url: /edit.php
script: edit.php
....
- url: /profile.php
script: profile.php我的问题是我有大约300个urls (我有300个php文件)。正如我所看到的,app.yaml允许您使用100个URLS。如何处理这个问题?有什么想法吗?
发布于 2014-12-29 20:42:37
您可以在PHP中使用regex模式,就像在注释中引用的Python示例中一样。因此,请尝试以下几点:
application: myproject-testing-112
version: 1
runtime: php
api_version: 1
threadsafe: yes
handlers:
- url: /(.+\.php).*
script: \1为了清楚起见,这个条目将映射匹配到同名PHP文件的每个URL。
/edit.php --> edit.php
/profile.php --> profile.php
/profile.php/foobar --> profile.php (the ".*" at the end of the regex allows this behavior)
/someOtherPath will not match the above entry at all, since it doesn't have ".php"显然,您可以调整正则表达式以获得所要寻找的确切行为。
https://stackoverflow.com/questions/27694367
复制相似问题