Reputation: 42043
What function to I use to redirect to the default 404 error page? Sample code appreciated. Thank you!
Upvotes: 1
Views: 1171
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
Reputation: 31130
abort(404)
as mentioned in the quickwiki tutorial. See the docs for abort.
Upvotes: 3