Browse Source

Fixed dev routing

tags/2.0.3
Teknikode 4 years ago
parent
commit
6c37129a32

+ 6
- 0
Teknik/Areas/About/AboutAreaRegistration.cs View File

@@ -14,6 +14,12 @@ namespace Teknik.Areas.About

public override void RegisterArea(AreaRegistrationContext context)
{
context.MapSubdomainRoute(
"About_dev", // Route name
"dev",
"About/{controller}/{action}", // URL with parameters
new { area = "About", controller = "About", action = "Index" } // Parameter defaults
);
context.MapSubdomainRoute(
"About_default", // Route name
"about",

+ 6
- 0
Teknik/Areas/Blog/BlogAreaRegistration.cs View File

@@ -20,6 +20,12 @@ namespace Teknik.Areas.Blog
// "blog/{controller}/{action}/{username}/{page}", // URL with parameters
// new { subdomain = "blog", area = this.AreaName, controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
// );
context.MapSubdomainRoute(
"Blog_dev", // Route name
"dev",
"Blog/{controller}/{action}", // URL with parameters
new { area = "Blog", controller = "Blog", action = "Index" } // Parameter defaults
);
context.MapSubdomainRoute(
"Blog_default", // Route name
"blog",

+ 7
- 1
Teknik/Areas/Dev/DevAreaRegistration.cs View File

@@ -18,7 +18,13 @@ namespace Teknik.Areas.Dev
context.MapSubdomainRoute(
"Dev_subdomain", // Route name
"dev",
"{area}/{controller}/{action}", // URL with parameters
"Dev/{controller}/{action}", // URL with parameters
new { area = "Dev", controller = "Dev", action = "Index" } // Parameter defaults
);
context.MapSubdomainRoute(
"Dev_default", // Route name
"dev",
"", // URL with parameters
new { area = "Home", controller = "Home", action = "Index" } // Parameter defaults
);
//context.MapRoute(

+ 7
- 1
Teknik/Areas/Home/HomeAreaRegistration.cs View File

@@ -17,12 +17,18 @@ namespace Teknik.Areas.Home
{
context.MapSubdomainRoute(
"Home_dev", // Route name
"dev",
"Home/{controller}/{action}", // URL with parameters
new { area = "Home", controller = "Home", action = "Index" } // Parameter defaults
);
context.MapSubdomainRoute(
"Home_subdomain", // Route name
"www",
"{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults
);
context.MapSubdomainRoute(
"Home_subdomain", // Route name
"Home_default", // Route name
null,
"{controller}/{action}", // URL with parameters
new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults

Loading…
Cancel
Save