How do I configure ASP.NET MVC routing to hide the controller name on a “home” page?

Try this: private void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”); routes.MapRoute(“default”, “{controller}/{action}/{id}”, new { action = “index”, id = “” }, // Register below the name of all the other controllers new { controller = @”^(account|support)$” }); routes.MapRoute(“home”, “{action}”, new { controller = “device”, action = “index” }); } e.g. /foo If foo is not a controller … Read more

How would I have ui-router go to an external link, such as google.com?

Angular-ui-router doesn’t support external URL, you need redirect the user using either $location.url() or $window.open() I would suggest you to use $window.open(‘http://www.google.com’, ‘_self’) which will open URL on the same page. Update You can also customize ui-router by adding parameter external, it can be true/false. $stateProvider .state(‘external’, { url: ‘http://www.google.com’, external: true }) Then configure … Read more

The requested resource does not support HTTP method ‘GET’

Please use the attributes from the System.Web.Http namespace on your WebAPI actions: [System.Web.Http.AcceptVerbs(“GET”, “POST”)] [System.Web.Http.HttpGet] public string Auth(string username, string password) {…} The reason why it doesn’t work is because you were using the attributes that are from the MVC namespace System.Web.Mvc. The classes in the System.Web.Http namespace are for WebAPI.

Symfony2 Routing – route subdomains

Just to point out that this is now added in Symfony v2.2 – http://symfony.com/doc/master/components/routing/hostname_pattern.html. mobile_homepage: path: / host: m.{domain} defaults: { _controller: AcmeDemoBundle:Main:mobileHomepage } requirements: domain: %domain% homepage: path: / defaults: { _controller: AcmeDemoBundle:Main:homepage }