3

Google AppEngine で単純な静的 Web サイトをホストしようとしていますが、カスタム 404 ページの設定に問題があります。

私はすべてのリクエストに対してapp.yaml(サブディレクトリから)静的ファイルを提供します:www

application: id
version: v
runtime: python27
api_version: 1
default_expiration: "1d"
threadsafe: yes

handlers:
- url: (.*)/
  static_files: www\1/index.html
  upload: www/index.html
- url: /
  static_dir: www

error_handlers:
- file: 404.html

しかし、存在しないファイルにアクセスしようとすると、404.html が表示されず、デフォルトの GAE エラー メッセージが表示されます。

ログには次のように表示されます。

Static file referenced by handler not found: www/does-not-exists/index.html

また

Static file referenced by handler not found: www/does-not-exists.html

私は何を間違っていますか?

4

2 に答える 2

0

これはうまくいきません。静的ハンドラーはほとんどのものに一致し、404 に対して error_handler を実行することはできません。

于 2013-07-25T14:31:38.180 に答える