Rewrite URL in IIS7 .NET MVC

Posted by user135498 on Stack Overflow See other posts from Stack Overflow or by user135498
Published on 2010-04-13T20:27:15Z Indexed on 2010/04/15 4:53 UTC
Read the original article Hit count: 308

Filed under:
|
|
|
|

Hi,

I'm trying to rewrite the url:

https://mydomain/phone-append

to

https://mydomain/Service/PhoneAppend

using the following rule:

<rewrite>
        <rules>
            <rule name="Phone Append">
                <match url="phone-append" />
                <action type="Rewrite" url="/Services/Index"  appendQueryString="true" />
            </rule>
        </rules>
    </rewrite>

The rule works fine if the rewrite url is /Services but when I change it to /Services/PhoneAppend I get a page not found error. I've been pulling my hair out for a couple hours. Any ideas?

Thanks, Chris

© Stack Overflow or respective owner

Related posts about rewrite

Related posts about url