The next generation of the Teknik Services. Written in ASP.NET. Fork for blog tags.
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.

BlogAreaRegistration.cs 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Web.Mvc;
  2. namespace Teknik.Areas.Blog
  3. {
  4. public class BlogAreaRegistration : AreaRegistration
  5. {
  6. public override string AreaName
  7. {
  8. get
  9. {
  10. return "Blog";
  11. }
  12. }
  13. public override void RegisterArea(AreaRegistrationContext context)
  14. {
  15. //context.MapSubdomainRoute(
  16. // "Blog_dev", // Route name
  17. // "dev",
  18. // "blog/{controller}/{action}/{username}/{page}", // URL with parameters
  19. // new { subdomain = "blog", area = this.AreaName, controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
  20. // );
  21. context.MapSubdomainRoute(
  22. "Blog_dev", // Route name
  23. "dev",
  24. "Blog/{controller}/{action}", // URL with parameters
  25. new { area = "Blog", controller = "Blog", action = "Index" } // Parameter defaults
  26. );
  27. context.MapSubdomainRoute(
  28. "Blog_default", // Route name
  29. "blog",
  30. "{controller}/{action}/{username}/{page}", // URL with parameters
  31. new { area = this.AreaName, controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
  32. );
  33. //context.Routes.MapSubDomainRoute(
  34. // "Blog_default", // Route name
  35. // "blog", // Domain with parameters
  36. // "{controller}/{action}", // URL with parameters
  37. // new { controller = "Blog", action = "Index" }, // Parameter defaults
  38. // new[] { typeof(Controllers.BlogController).Namespace }
  39. // );
  40. //context.MapRoute(
  41. // "Blog_default",
  42. // "{subdomain}/{controller}/{action}/{username}/{page}",
  43. // new { subdomain = "blog", controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional },
  44. // namespaces: new[] { "Teknik.Areas.Blog.Controllers" }
  45. //);
  46. }
  47. }
  48. }