ensnare
ensnare

Reputation: 42043

Pylons redirect to 404 error page

What function to I use to redirect to the default 404 error page? Sample code appreciated. Thank you!

Upvotes: 1

Views: 1171

Answers (2)

Wyzard
Wyzard

Reputation: 34563

404 isn't something you redirect to; there's no distinct "404 page" with its own distinct URL. It's a status code that you send back in the HTTP response, instead of 200 (the code for a normal successful response).

Actual redirects are also status codes, such as 301 or 307, that can be used instead of 200 or 404.

Read about the status line in an HTTP response for more info.

Upvotes: 0

Heikki Toivonen
Heikki Toivonen

Reputation: 31130

abort(404) as mentioned in the quickwiki tutorial. See the docs for abort.

Upvotes: 3

Related Questions