Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jaffar Shehab 3 posts 73 karma points
    Mar 27, 2018 @ 07:57
    Jaffar Shehab
    0

    How to add DomainRoute

    Hi,

    I would like to display my customer name in the domain like

    • http://storeName1.myDomain.com/...
    • http://storeName2.myDomain.com/...

    I have tried to add DomainRoute such as the pure MVC but it is not working in umbraco

    /****For Pure MVC***/
    routes.Add("DomainRoute", new DomainRoute( 
        "{storeName}.example.com",     // Domain with parameters 
        "{controller}/{action}/{id}",    // URL with parameters 
        new { language = "en", controller = "Home", action = "Index", id = "" }  // Parameter defaults 
    )); 
    

    How to add the {storeName} parameter to the domain as a prefix?

    Site setup: - One Umbraco websites - Each store is a database record; not a single website

  • John Churchley 272 posts 1257 karma points c-trib
    Mar 27, 2018 @ 08:18
    John Churchley
    0

    Make sure you binding are set correctly in IIS. Then right click the homenode and under Culture & Hostnames add the subdomain for the corresponding site.

  • Jaffar Shehab 3 posts 73 karma points
    Mar 27, 2018 @ 08:53
    Jaffar Shehab
    0

    Thank you very much John for the quick answer.

    but this will not work for my case, the storeName is a dynamic parameter taken form database that contains an increasing number of stores records.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies