asp.net mvc - How can I force all IIS requests to go to one MVC controller & action? -


i have situation figured quite easy in mvc. want have request on iis site end going 1 specific action.

so added following route

    routes.maproute(             "everything",             "{*foo}",             new { controller = "home", action = "index" }         ); 

that works request going server, there things ending being dealt other handlers:

this in mvc 5, don't think should make difference solution.

what trick missing here?

i use url rewrite module this. should it. (obviously, change url whatever want):

    <rewrite>         <rules>             <rule name="catch-all" stopprocessing="true">                 <match url=".*" />                 <action type="rewrite" url="/index.html" appendquerystring="false" />             </rule>         </rules>     </rewrite> 

Comments