void CRedirectExtension::Default(CHttpServerContext* pCtxt){ StartContent(pCtxt); WriteTitle(pCtxt); *pCtxt << _T("This default message was produced by the Internet"); *pCtxt << _T(" Server DLL Wizard. Edit your CRedirectExtension::Default()"); *pCtxt << _T(" implementation to change it.\r\n"); CHAR chUrl[256]; DWORD dwSize; wsprintf (chUrl,"http://www.21cn.com");// second paramter is the url to redirect dwSize = lstrlen (chUrl); pCtxt->ServerSupportFunction (HSE_REQ_SEND_URL_REDIRECT_RESP,chUrl, &dwSize, NULL); EndContent(pCtxt);}