我需要将“.... sitename.com/login.html/”中的快速IIS redriect配置为“.... sitename.com/login.html”而不使用isapi重写。iis 6 url rewrite without isapi
我已经尝试在Application_BeginRequest中添加重定向。
void Application_BeginRequest(object sender, EventArgs e)
{
//To Redirect Bad-Url (login.html/) which i subscribed to uConnect.intel.com
if (string.Compare(this.Request.Url.AbsolutePath, "login.html/", StringComparison.OrdinalIgnoreCase) != 0)
{
this.Response.Redirect("../login.html", true);
}
}
但它没有被命中并且自定义404错误页面显示。
有人能帮助我,如果我可以通过一些iis属性更改来实现此目的吗?