Google app engine 如何使用正则表达式匹配webapp2中的静态html文件?

Google app engine 如何使用正则表达式匹配webapp2中的静态html文件?,google-app-engine,webapp2,Google App Engine,Webapp2,因此,我希望提供html文件,因为它们基本上来自根目录以及一些子目录,因此在我的app.yaml文件中,我放了: - url: /(.*\.(html))$ static_dir: /\1 upload:/(.*\.(html))$ 但这与根目录中的index.html不匹配。我如何匹配这个?我假设如果我有子目录,我可以添加它们,就像: - url: /sub_dir/(.*\.(html))$ static_dir: sub_dir/\1 upload: sub_dir/(.

因此,我希望提供html文件,因为它们基本上来自根目录以及一些子目录,因此在我的app.yaml文件中,我放了:

- url: /(.*\.(html))$
  static_dir: /\1
  upload:/(.*\.(html))$
但这与根目录中的index.html不匹配。我如何匹配这个?我假设如果我有子目录,我可以添加它们,就像:

- url: /sub_dir/(.*\.(html))$
  static_dir: sub_dir/\1
  upload: sub_dir/(.*\.(html))$

谢谢

我想你可能把
静态目录
静态目录文件
混淆了。尝试:

- url: /(.*\.(html))$
  static_files: \1
  upload: (.*\.(html))$

这指向您根目录下的
.html
文件。

现在似乎更近了一点,我看到:/index.html没有作为错误消息找到,但我正在查看index.html,它在根目录中,有什么想法吗?我试过这个:-url:/static\u files:index.html upload:,成功了。关闭!我还必须从static_files条目中删除尾随斜杠,使其看起来像“\1”。谢谢!