フォーク元 Teknikode/Teknik
選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
44 行
1.5 KiB
44 行
1.5 KiB
using System.Web.Mvc; |
|
using Teknik; |
|
|
|
namespace Teknik.Areas.Home |
|
{ |
|
public class HomeAreaRegistration : AreaRegistration |
|
{ |
|
public override string AreaName |
|
{ |
|
get |
|
{ |
|
return "Home"; |
|
} |
|
} |
|
|
|
public override void RegisterArea(AreaRegistrationContext context) |
|
{ |
|
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_default", // Route name |
|
null, |
|
"{controller}/{action}", // URL with parameters |
|
new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults |
|
); |
|
//context.MapRoute( |
|
// "Home_default", |
|
// "{controller}/{action}", |
|
// new { area = "Home", controller = "Home", action = "Index" }, |
|
// namespaces: new[] { "Teknik.Areas.Home.Controllers" } |
|
//); |
|
} |
|
} |
|
} |