The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HomeAreaRegistration.cs 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Web.Mvc;
  2. using Teknik;
  3. namespace Teknik.Areas.Home
  4. {
  5. public class HomeAreaRegistration : AreaRegistration
  6. {
  7. public override string AreaName
  8. {
  9. get
  10. {
  11. return "Home";
  12. }
  13. }
  14. public override void RegisterArea(AreaRegistrationContext context)
  15. {
  16. context.MapSubdomainRoute(
  17. "Home_dev", // Route name
  18. "dev",
  19. "Home/{controller}/{action}", // URL with parameters
  20. new { controller = "Home", action = "Index" }, // Parameter defaults
  21. new[] { typeof(Controllers.HomeController).Namespace }
  22. );
  23. context.MapSubdomainRoute(
  24. "Home_subdomain", // Route name
  25. "www",
  26. "{controller}/{action}", // URL with parameters
  27. new { controller = "Home", action = "Index" }, // Parameter defaults
  28. new[] { typeof(Controllers.HomeController).Namespace }
  29. );
  30. context.MapSubdomainRoute(
  31. "Home_default", // Route name
  32. null,
  33. "{controller}/{action}", // URL with parameters
  34. new { controller = "Home", action = "Index" }, // Parameter defaults
  35. new[] { typeof(Controllers.HomeController).Namespace }
  36. );
  37. }
  38. }
  39. }