我正在使用 CustomMvcRouterHandler,基于一些逻辑,我只想将用户从 CustomHandler 重定向到另一个 Url。
public class CustomMvcRouterHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
if (requestContext.HttpContext.Request.IsAuthenticated)
{
if (logic is true)
{
string OrginalUrl = "/Home/AboutUs";
// redirect Url = "/Home/CompanyProfile";
return new MvcHandler(requestContext);
}
}
return new MvcHandler(requestContext);
}
}
如何从 CustomRouterHandler 将用户重定向到“Home/CompanyProfile”?