简体   繁体   中英

Create a Subdomain route in asp.net

I am trying to create a Subdomain route in asp.net

this is the current domain

www.example.com/default.aspx

and I am trying to replace

"www" with a subdomain "foo"
foo.example.com/default.aspx

This is my current RouteProivder page

namespace Nop.Plugin.Wca.ExpertEstimator
{
    class RouteProvider : IRouteProvider
    {
       public void RegisterRoutes(RouteCollection routes)
       {
            var route = routes.MapPageRoute(
               "ExpertEstimator",
               "/default.aspx",
               "~/Plugins/Wca.ExpertEstimator/default.aspx"
       );
    }

      public int Priority
      {
           get
           {
               return 0;
           }
      }
   }
}

Any input would be greatly appreciated

You will find detailed information in the Article Here

Earlier answers to simlar questions Question 1 or Question 2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM