Creates an HTTP handler that returns a redirect response.
Arguments
- path
URI path to match (e.g., "/old-page").
- location
URL to redirect to. Can be relative (e.g., "/new-page") or absolute (e.g., "https://example.com/page").
- status
HTTP redirect status code. Must be one of:
301 - Moved Permanently
302 - Found (default)
303 - See Other
307 - Temporary Redirect
308 - Permanent Redirect
- prefix
[default FALSE] Logical, if TRUE matches path as a prefix.
Value
A handler object for use with http_server().
