Re: How can we customized "404 Not Found"


Mike Youngstrom <youngm@...>
 

We passed the smoke tests by:

* Only returning a 503 if the requested route exists.
* Embed the old 404 page text in a comment of the returned html.

Mike

On Thu, Apr 14, 2016 at 9:56 AM, Stefan Mayr <stefan(a)mayr-stefan.de> wrote:

Hi,

Am 14.04.2016 um 13:23 schrieb James Leavers:

The end of this presentation [1] from the CF Summit has an example of
creating a wildcard route to route 404s to an app, using cf map-route.

[1]

http://berlin2015.cfsummit.com/sites/berlin2015.cfsummit.com/files//pages/files/summit-berlin.pdf

On 14 April 2016 at 11:20:17, Stanley Shen (meteorping(a)gmail.com
<mailto:meteorping(a)gmail.com>) wrote:

Thanks Mike.
Could you show me how can I do things like that, of if there are some
document about it?

If there are other ways to do that?

Thanks,
Stanley
This week we did basically the same
- map application with a wildcard domain
- change the errorpage
- change the statuscode to 503 service unavailable (search engines should
not remove us from their index because of a 404)

We used a staticfile application with a modified nginx.conf to achive
this. Michal Kuratczyk put a simplified prototype into his github repo (
https://github.com/mkuratczyk/maintenance)

Warning: this broke the smoke tests for Pivotal Cloud Foundry 1.6

Regards,

Stefan Mayr

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.