redirect(request, path, permanent=False):
→ hou.webServer.Response
This convenience function automatically sets the response code to 404 and generates an error message to indicate the requested resource was not found or does not exist.
The client must set the Host:
HTTP header on the request for this to work (browsers and other well-written clients will always do this, but if you're writing your own lightweight client for some reason, you should keep this in mind).
request
The Request
object passed to the URL handler or API function.
path
The server path to redirect the client to.
permanent
If True
, the server returns HTTP status 301 Moved Permanently
.
Otherwise it returns 302 Found
.
See also |