Google App Engine and 404 error

前端 未结 9 1249
一生所求
一生所求 2020-12-02 06:46

I\'ve setup a static website on GAE using hints found elsewhere, but can\'t figure out how to return a 404 error. My app.yaml file looks like

- url: (.*)/
           


        
9条回答
  •  长情又很酷
    2020-12-02 07:19

    google app engine now has Custom Error Responses

    so you can now add an error_handlers section to your app.yaml, as in this example:

    error_handlers:
    
    - file: default_error.html
    
    - error_code: over_quota
        file: over_quota.html
    

提交回复
热议问题