0

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

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by Fortinbra
0

This actually sounds like a question for GoDaddy's support. Are you running on an older account using IIS 6, or IIS 7? Your control panel for GoDaddy will tell you your IIS version. I'm not sure whether the type of module your creating was capable on IIS 6. It may also be a permissions issue as well.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.