i think we can create custom http handler,how we can create cutom http handler to change values of url or to redirect ul to new url.code to create custom http handler, and where we need to changes and what changes we can do for this in project.
if all url with .aspx extension will redirect to new url, then it's code in webconfig or in all webform we neeed to add call method to handler?
i created a class handler
public class handler : IHttpHandler
{
public handler()
{
//
// TODO: Add constructor logic here
//
}
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
HttpResponse response = context.Response;
response.Redirect("users/newtask.html");
}
}
and added code in webconfig
<httpHandlers>
<!--<add verb="*" path="*.aspx" type="handler"/>-->
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
<!--<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler" />
<add verb="*" path="*.asmx" type="System.Web.Services.Protocols.WebServiceHandlerFactory" />-->
</httpHandlers>
if any file webform with extension .aspx open in webbrowser then it will redirect that request to users/newtask with help of http handler