Google App Engine应用没有链接

时间:2013-12-06 19:04:16

标签: php codeigniter google-app-engine app.yaml

我第一次使用Google App Engine。我正在尝试上传CodeIgniter网站,但问题是该网站没有链接正常工作。每个链接,甚至是css和js都会进入索引页面。

这是我的app.yaml:

application: vatiali-dev
version: 1
runtime: php
api_version: 1
threadsafe: false

handlers:
- url: /css
  static_dir: css/

- url: /js
  static_dir: js/

- url: /fonts
  static_dir: fonts/

- url: /.*
  script: index.php

1 个答案:

答案 0 :(得分:2)

您应该将 app.yaml 更改为如下所示:

application: vatiali-dev
version: 1
runtime: php
api_version: 1
threadsafe: true

handlers:
- url: /css/*
  static_dir: css
- url: /js/*
  static_dir: js
- url: /fonts/*
  static_dir: fonts    
- url: /.*
  script: index.php

我还将threadsafe更改为true,除非您因特定原因将其设置为false我认为将其设置为true是最佳做法/标准,否则您可能会遇到性能问题。