Hi,
I want the rewrite url to work on the virtual dedicated server. so when someone enters the url without extension like http://megafastline.com/feedback , it shud display the contents of the page feedback.aspx
The code work perfectly fine in the localhost, but when i uploaded this on the godaddy dedicated virtual server and hit http://megafastline.com/feedback , i m getting
page cannot be found!
This is my code below
in webconfig file
<httpModules>
<add name="UrlRewrite" type="UrlRewrite" />
</httpModules>
......................................................................
and a class in app_code called UrlRewrite.cs;
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for FixURLs
/// </summary>
public class UrlRewrite : IHttpModule
{
public UrlRewrite()
{
//
// TODO: Add constructor logic here
//
}
#region IHttpModule Members
public void Dispose()
{
// do nothing
}
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}
#endregion
void context_BeginRequest(object sender, EventArgs e)
{
HttpApplication app = (HttpApplication)sender;
if (app.Request.RawUrl.ToLower().Contains("feedback"))
{
app.Context.RewritePath("FeedBack.aspx");
}
}
}
I am not sure what kinda iis setting i need to make, if i were to do any?
I appreciate your help!
Thanks
sandesh