The RedirectRequest method can be used within a
HTTP_CLIENT_COMMAND event handler to redirect the client to a new
location for the resource that it has requested. This redirection can
be permanent or temporary, depending on whether the server expects the
client to continue to use the original URL when requesting the
resource.
If the HTTP_REDIRECT_TEMPORARY method is used, the actual status
code that is returned to the client depends on the version of the
protocol that is being used. If the client has issued the request
using HTTP 1.0 then the server will return a 302 code to the client.
If the client is using HTTP 1.1, the server will return a 307 code to the
client that indicates it should use the same command verb (GET, POST,
etc.) when requesting the resource at the new location.
If the HTTP_REDIRECT_OTHER method is used, the status code that is
returned to the client depends on which version of the protocol is
being used. For clients who are using HTTP 1.0, the server will return
a 302 code to the client just as with the HTTP_REDIRECT_TEMPORARY
method. If the client is using HTTP 1.1, the server will return a 303
code to the client that indicates it should always use the GET command
to request the new resource, regardless if a different command was
originally used (POST, PUT, etc.)
This method provides a simplified interface for sending a redirection
status code that also implicitly sets the Location response header to
the value of the lpszLocation parameter. If the server application
needs to send alternate redirection codes such as 305 (Use Proxy) then
it should use the SendReponse method.