views:

23

answers:

1

Hi I have a comment form on my website on contact.aspx. I want to be able to put up a redirect from /comment (no extension) to point to contact.aspx.

I set up the following url mapping in my web.config and when I test locally it works fine. When I post it to production, the redirect doesn't happen and I get the IIS 404 error.

<system.web>
    <urlMappings enabled="true">
        <add
        url="~/comment"
        mappedUrl="~/contact.aspx"/>
    </urlMappings>

I'm assuming this is because IIS isn't serving up the request to the asp.net engine and I'm using a shared hosting environment (discountasp.net) so I don't have direct control over IIS to configure it there. I can always put in the subfolder and a default.aspx that will redirect for me, but I thought I would inquire about this route first.

What does the collective think?

many thanks!

A: 

Ask your web host if they can configure your virtual directory to serve all requests through ASP.Net.

Many hosts (mine included) are willing to do this. (Mention ASP.Net MVC, which requires this)

SLaks
cool idea. I'll look into this.
senloe
They say, `For IIS 6.0 users: Contact technical support to configure wildcard mapping to point to asp.net for the directory where you uploaded your MVC application.`
SLaks