This support function allows your ISAPI extension to redirect a client browser to a different URL from the one initially requested. When this support function is called, you must provide the new URL. IIS then sends the HTTP status code 302 (URL Redirect) to the client browser.
BOOL ServerSupportFunction( HCONN ConnID, DWORD dwServerSupportFunction, LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer, LPDWORD lpdwDataType );
Specifies the connection identifier of the client to which the response data should be sent.
The name of the Server Support function, which in this case must be set to HSE_REQ_SEND_URL_REDIRECT_RESP.
Points to a null-terminated string that contains the absolute URL to which the client browser should be redirected.
Points to the size of the buffer specified by lpvBuffer.
Unused in this ServerSupportFunction request type.
Once this support function is called, no other tasks are required of your ISAPI extension to process the current request. HTTP status code 302 responses should force the browser to initiate a new connection with the new URL.
In order to conform to the HTTP 1.1 specification (RFC 2068), it is important that the target URL be absolute. For example, the following is a correct, absolute URL that should work with all HTTP 1.1-compliant browsers:
However, the following URL is relative and could be rejected by some browsers:
This support function is similar to the URL: <URL> syntax used CGI script headers to perform redirection.
Note that this support function is identical to HSE_REQ_SEND_URL.
Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.
Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.
Header: Declared in httpext.h.