如何配置app.yaml文件以將所有網址重定向到另一個網址?例如,我想要http://test.appspot.com/hello或http://test.appspot.com/hello28928723重定向到http://domain.com。如何使用Google App Engine重定向所有網址
我目前只提供靜態文件。這是我的app.yaml文件:
application: testapp
version: 1
runtime: python
api_version: 1
handlers:
- url: (.*)/
static_files: static\1/index.html
upload: static/index.html
- url:/
static_dir: static
此答案不完整 - 該代碼片段本身不足以重定向reqeusts。另外,獲取請求呢? – 2012-05-01 22:50:07
@BrianLeathem剛剛發佈了一個[完整示例](http://stackoverflow.com/a/18297787/282729)。 – feklee 2013-08-18 09:50:57