Share via


HSE_REQ_SEND_URL_REDIRECT_RESP

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
);

Parameters

  • ConnID
    Specifies the connection identifier of the client to which the response data should be sent.

  • dwServerSupportFunction
    The name of the Server Support function, which in this case must be set to HSE_REQ_SEND_URL_REDIRECT_RESP.

  • lpvBuffer
    Points to a null-terminated string that contains the absolute URL to which the client browser should be redirected.

  • lpdwSizeofBuffer
    Points to the size of the buffer specified by lpvBuffer.

  • lpdwDataType
    Unused in this ServerSupportFunction request type.

Remarks

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.

Note

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:

https://www.microsoft.com/default.asp

However, the following URL is relative and could be rejected by some browsers:

default.asp

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.

Requirements

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.

Product: IIS

Header: Declared in httpext.h.