is there any IIS setting require for url rewriting?

Posted by Samir on Stack Overflow See other posts from Stack Overflow or by Samir
Published on 2010-04-14T04:28:12Z Indexed on 2010/04/14 4:33 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

Hello, i have used URL rewriting using global.asax file. url rewriting is working file on local machine but when i made it online its not working.

void Application_BeginRequest(Object sender, EventArgs e) { var extension = Path.GetExtension(Request.PhysicalPath).ToLower();

if (File.Exists(Request.PhysicalPath))
{
    if (extension == ".html")
    {
        Response.WriteFile(Request.PhysicalPath);
        Response.End();
    }
    return;
}

var path = Request.Path;

if (!Context.Items.Contains("ORIGINAL_REQUEST"))
    Context.Items.Add("ORIGINAL_REQUEST", path);

if (extension == ".html")
{
    var resource = UrlRewriting.FindRequestedResource();
    var command = UrlRewriting.GetExecutionPath(resource);
    Context.RewritePath(command, true);
}

}

url is:ind205.cfmdeveloper.com when you click on about us ,demo,advertise page it will not display. so please let me know is there any IIS setting require,

reply me soon thanks Samir

© Stack Overflow or respective owner

Related posts about iis

Related posts about ASP.NET