I'd like to handle 404s on my site in such a way that:
- there is no redirect, e.g. if you type in a url like mysite.com/
foobarme, you'll stay at that url, so maybe you can correct it
- the status code returned is 404 (not 200 OK)

See stackoverflow:

http://stackoverflow.com/bob

So I tried something like this:

    // Catch 404s
    LiftRules.uriNotFound.prepend {
      case (req, _) => RewriteResponse("404" :: Nil)
    }

But of course RewriteResponse is not a LiftResponse.  Whats the best
way to do this?  Basically I've got a template called 404.html which
I'd like to display whenever there is a 404.

I Just thought of something, perhaps I could add a RewriteRule that
matches everything?

- Alex

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to