Google App Engine url_rewrite php app

时间:2013-06-14 21:26:46

标签: php google-app-engine url-rewriting yaml

GAE的新手,想在本地使用GAE测试我的php网站。 我已全部设置并让我的网站在localhost上运行:8080与GAE。

php网站已经使用以下配置运行nginx

# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.php?q=$uri&$args;

像localhost / dynamic-url这样的网址已经转发到像php.php这样的php应用程序?q = dynamic-url。

如何通过GAE实现这一目标?我可以在没有触摸php文件的情况下发生这种情况吗?

这是我的yaml文件

application: gallerysite
version: 1
runtime: php
api_version: 1

handlers:

- url: /img
  static_dir: img

- url: /css
  static_dir: css

- url: /js
  static_dir: js

- url: /.*
  script: index.php

1 个答案:

答案 0 :(得分:1)

请参阅Jimmys优秀帖子中关于“清除URL”的部分,该帖子关于在GAE上站起来drupal以编写简单的路由器脚本。

http://blog.boombatower.com/drupal-google-app-engine