【问题标题】:Google App Engine url_rewrite php appGoogle App Engine url_rewrite php 应用程序
【发布时间】:2013-06-14 21:26:46
【问题描述】:

对 GAE 完全陌生,想在本地使用 GAE 测试我的 php 站点。 我已经完成所有设置,并让我的网站使用 GAE 在 localhost:8080 上运行。

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 这样的 url 已经被转发到像 index.php?q=dynamic-url 这样的 php 应用程序。

如何使用 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

【问题讨论】:

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


    【解决方案1】:

    请参阅 Jimmys 优秀文章中关于在 GAE 上支持 drupal 的“清理 URL”部分,了解编写简单路由器脚本的方法。

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

    【讨论】:

      猜你喜欢
      • 2010-09-07
      • 2010-12-23
      • 2013-02-05
      • 2011-03-08
      • 2019-07-18
      • 2011-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多