目次

Version 2, last updated by timperrett at Nov 28 01:17 UTC

In Boot.scala you can add the following code to render a custom 404 page:


    LiftRules.uriNotFound.prepend(NamedPF("404handler"){
      case (req,failure) => 
        NotFoundAsTemplate(ParsePath(List("404"),"html",false,false))
    })

The 404.html or 404[locale].html should now be rendered when requesting a unknown resource.

See also: Nice 404s sans Redirect