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.

BlogAreaRegistration.cs 1009B

12345678910111213141516171819202122232425262728293031
  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}", // URL with parameters
  19. new { controller = "Blog", action = "Index" } // Parameter defaults
  20. );
  21. context.MapSubdomainRoute(
  22. "Blog_default", // Route name
  23. "blog",
  24. "{controller}/{action}/{username}/{page}", // URL with parameters
  25. new { controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
  26. );
  27. }
  28. }
  29. }