+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sub domains...

Sub domains...

46 posts, 0 answered
  1. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    04 Dec 2007
    Link to this post
    I have a site that is split accross multiple sub domains.  I obviously "could" create a separate "instance" of sitefinity for each sub-domain, but I want to create one, big cohesive site with single sign-in access.  In other words, I need them to be able to log in to:

    www.domain.com

    But then have "logged in" access to:
    sub1.domain.com
    sub2.domain.com
    and
    sub3.domain.com.

    I want the search function to search accross all sub domains.  Etc.

    What's the best way to handle this situation?

    Thank you and I look forward to any suggestions that might be available.  Take care.

    EJ
  2. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    06 Dec 2007
    Link to this post
    Hi Ben Alexandra,

    Unfortunately, there is no such functionality available out of the box. You could implement this by adding custom HttpModule to load the home page corresponding to each domain. Next, you need to modify the navigational controls to start from the domain’s root page. Also, if you are going to use shared content, News or Blogs that should be specific to each domain, you'll have to add a provider for each domain and specify different application name for each provider. Then permissions can be set per provider.

    We have already tried this approach for a customer and I must say it is not very practical and straightforward. Since there have been quite a lot of requests for such scenarios, we are currently considering providing this functionally out of the box but I can’t promise that it will make it for v3.2.

    However, if you decide to give it a try, I can send you more detailed instructions and a sample project. Note that this approach may not be fully compatible with the one that we will provide later.

    Regards,
    Bob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    10 Jan 2008
    Link to this post
    I am trying to do the same thing for a number of projects.  Can you send me the information also?
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    11 Jan 2008
    Link to this post
    Hello James,

    Here is a basic solution we have provided for one of our clients. You can customize and extend it according to your needs.

    Description of the implemented scenario:
    For example, you have one WebSite and 2 domains pointing to it:
        www.domain1.com
        www.domain2.com

    In the SiteMap you have:
        Root
            domain1 - group page
                default.aspx
                page1.aspx
            domain2 - group page
                default.aspx
                page1.aspx
             
    requesting www.domain1.com opens ~/domain1/default.aspx
    requesting www.domain2.com opens ~/domain2/default.aspx

    The solution works only when the web application is set as a Web Site in the IIS, not a virtual directory.
    The files are attached to this post. You should copy them into the App_Code folder of your site and make the appropriate changes in the web.config, as mentioned below.

    DomainUrlHelper defines the domains mapping and provides helper methods for resolving and unresolving URLs:
    using System; 
    using System.Data; 
    using System.Configuration; 
    using System.Web; 
    using System.Web.Security; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using System.Web.UI.WebControls.WebParts; 
    using System.Web.UI.HtmlControls; 
    using System.Collections.Generic; 
     
    namespace DomainMapping 
        /// <summary> 
        /// Summary description for DomainUrlHelper 
        /// </summary> 
        public static class DomainUrlHelper 
        { 
            static DomainUrlHelper() 
            { 
                domains = new Dictionary<stringstring>(); 
                domains.Add("www.domain1.com""domain1"); 
                domains.Add("www.domain2.com""domain2"); 
            } 
     
            public static string ResolveUrl(string url) 
            { 
                string domainRoot = GetDomainRoot(); 
                if (!String.IsNullOrEmpty(domainRoot)) 
                { 
                    return url.Replace(domainRoot + "/"""); 
                } 
                return url; 
            } 
     
            public static string UnresolveUrl(string url) 
            { 
                string domainRoot = GetDomainRoot(); 
     
                if (!String.IsNullOrEmpty(domainRoot) && url.StartsWith("/") && (url.Length > 1)) 
                { 
                    int index = url.IndexOf('/', 1); 
                    if (index > 0) 
                    { 
                        string parentPath = url.Substring(1, index - 1); 
                        if (parentPath.Equals(domainRoot)) 
                        { 
                            return url; 
                        } 
                        else if (domains.ContainsValue(parentPath)) 
                        { 
                            foreach (KeyValuePair<stringstring> pair in domains) 
                            { 
                                if (pair.Value.Equals(parentPath)) 
                                {  
                                    HttpContext.Current.Response.Redirect( 
                                        String.Concat(HttpContext.Current.Request.Url.Scheme, "://", pair.Key, url)); 
                                    break
                                } 
                            } 
                        } 
     
                    } 
                    return String.Concat("/", domainRoot, url); 
                } 
                return url; 
            } 
     
            public static string GetDomainRoot() 
            { 
                string domainRoot = null
                if (domains.TryGetValue(HttpContext.Current.Request.Url.Host, out domainRoot)) 
                    return domainRoot; 
     
                return string.Empty; 
            } 
     
            public static Dictionary<String, String> Domains 
            { 
                get 
                { 
                    return domains; 
                } 
            } 
     
            private static Dictionary<String, String> domains; 
        } 


    DomainUrlRewriteModule overrides GetUrl method to change the rewrite path:
    using System;    
    using System.Data;    
    using System.Configuration;    
    using System.Web;    
    using System.Web.Security;    
    using System.Web.UI;    
    using System.Web.UI.WebControls;    
    using System.Web.UI.WebControls.WebParts;    
    using System.Web.UI.HtmlControls;    
    using Telerik.Cms.Web;    
        
    namespace DomainMapping    
    {    
        /// <summary>    
        /// Summary description for DomainHomePageModule    
        /// </summary>    
        public class DomainUrlRewriteModule : CmsHttpModule    
        {    
            protected override string GetUrl(HttpContext context)    
            {    
                string path = base.GetUrl(context);  
                if (String.IsNullOrEmpty(path))  
                    path = context.Request.RawUrl;    
                path = DomainUrlHelper.UnresolveUrl(path);    
                return path;    
            }    
        }    
    }    
     


    DomainSiteMapProvider inherits CmsSiteMapProvider to change the nodes structure and URLs according to the domain mapping setting:

    using System; 
    using System.Data; 
    using System.Configuration; 
    using System.Web; 
    using System.Web.Security; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using System.Web.UI.WebControls.WebParts; 
    using System.Web.UI.HtmlControls; 
    using Telerik.Cms.Web; 
    using Telerik.Cms; 
    using System.Collections.Generic; 
     
    namespace DomainMapping 
        /// <summary>  
        /// Summary description for CustomCmsSiteMapProvider  
        /// </summary>  
        public class DomainSiteMapProvider : CmsSiteMapProvider 
        { 
            //protected override CmsSiteMapNode CreateSiteMapNode(ICmsPage page, CmsSiteMapNode parentNode, string path) 
            //{ 
            //    return base.CreateSiteMapNode(page, parentNode, path); 
            //} 
     
            protected override CmsSiteMapNode CreateSiteMapNode(ICmsPage page, CmsSiteMapNode parentNode, string path) 
            { 
                return new DomainSiteMapNode(this, page, parentNode, path); 
                //return base.CreateSiteMapNode(page, parentNode, path); 
            } 
     
            //protected override CmsSiteMapNode CreateSiteMapNode(Telerik.Cms.ICmsPage page) 
            //{ 
            //    return new DomainSiteMapNode(this, page); 
            //} 
     
            public override SiteMapNode RootNode 
            { 
                get 
                { 
                    SiteMapNode node; 
                    if (this.rootNodes == null
                    { 
                        this.rootNodes = new Dictionary<string, SiteMapNode>(); 
                        node = base.RootNode; 
     
                        foreach (string domainHome in DomainUrlHelper.Domains.Values) 
                        { 
                            node = this.FindSiteMapNode(String.Concat("/", domainHome, UrlHelper.PageExtension)); 
                            if (node != null
                                this.rootNodes.Add(domainHome, node); 
                        } 
                    } 
     
                    string domainRoot = DomainUrlHelper.GetDomainRoot(); 
                    if (!String.IsNullOrEmpty(domainRoot)) 
                    { 
                        if (this.rootNodes.TryGetValue(domainRoot, out node)) 
                            return node; 
                    } 
                    return base.RootNode; 
                } 
            } 
     
            private Dictionary<String, SiteMapNode> rootNodes; 
        } 
     
        public class DomainSiteMapNode : CmsSiteMapNode 
        { 
            public DomainSiteMapNode(CmsSiteMapProvider provider, ICmsPage page, CmsSiteMapNode parentNode, string path) 
                : base(provider, page, parentNode, path) 
            { 
            } 
     
            public override string Url 
            { 
                get 
                { 
                    return DomainUrlHelper.ResolveUrl(base.Url); 
                } 
                set 
                { 
                    base.Url = value; 
                } 
            } 
        } 
    }  
     


    Settings in the web.config:
    ... 
    <httpModules> 
      <add name="Cms" type="DomainMapping.DomainUrlRewriteModule" /> 
    </httpModules> 
    ... 
    <siteMap defaultProvider="CmsSiteMapProvider" enabled="true"
      <providers> 
        <clear /> 
        <add name="CmsSiteMapProvider" description="Displays Cms Pages" type="DomainMapping.DomainSiteMapProvider" /> 
      </providers> 
    </siteMap> 
    ... 


    Please let us know if you experience any problems.

    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    12 Jan 2008
    Link to this post
    Thanks for the solution.  How can I use it to implement a subdomain?  For example:
    Main domain www.domain.com
    Sub domain department.domain.com

    Thanks.
  6. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    14 Jan 2008
    Link to this post
    Hi James,

    Regarding this solution, you should not map the main domain to any page, i.e. www.domain.com should open the root of the site (standard Sitefinity functionality).
    Every subdomain should be mapped to an existing page under the root of your application. For example:


     domain/subdomain  page 
     www.domain.com  root
          department.domain.com       departments
          any.domain.com
          any

    Please let us know if you need further information.

    Kind regards,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    13 Jun 2008
    Link to this post
    will mapping to the subpages cause the site to "forward" to that page instead of being an actual subdomain?

    what I want is to be able to have site.com and subdomain.site.com. it is okay if subdomain.site.com maps to site.com/subdomain, that is okay and it makes sense of course... however if someone types in subdomain.site.com, I want them to STAY on subdomain.site.com, and NOT be forwarded to site.com/subdomain.

    can this be done simply or would I have to go the complicated route explained above?
  8. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    16 Jun 2008
    Link to this post
    Hello Josh,

    Actually, the behavior you require can be achieved using this solution, i.e. when the user types subdomain.site.com, it stays at subdomain.site.com, but when the user types site.com/subdomain, it redirects to subdomain.site.com.

    Please let us know it works differently in your site.

    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Mike
    Mike avatar
    22 posts
    Registered:
    05 Mar 2008
    17 Jun 2008
    Link to this post
    Vlad,

    I am trying to use your posted code and i am running into a problem. If i request the main domain everything works fine, but when i request the subdomain i get an under construction page with the message 

    Thank you for visiting our web site. Please return soon for updates.

    If i try to type in a known path under the subdomain i get a 404 error.

    i modified the DomainUrlHelper  with my domains like so,

     static DomainUrlHelper()  
            {  
                domains = new Dictionary<string, string>();  
                domains.Add("sitefinity.xxx.org", "xxx");  
                domains.Add("employee.xxx.org", "employee");  
            }  
     

    with the xxx being our domain name.

    is it a requirement that the first child page in the page group be called default.aspx? that is the only difference that i can see in my setup versus the explanations you have listed here.

    Any help is greatly appreciated.
    mike
  10. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    18 Jun 2008
    Link to this post
    Hi Mike,

    Actually, this depends on the IIS settings. For example, if the wild card mapping is not set and the default document is default.aspx for your web site (the default settings), when your request URL: employee.xxx.org the IIS will change it to employee.xxx.org/default.aspx and the implementation bellow will rewrite it to employee.xxx.org/employee/default.aspx. So, in this case, it is a requirement that the first page is called default.aspx.
    However, you can change this behavior by customizing DomainUrlHelper.UnresolveUrl method:

            public static string UnresolveUrl(string url)  
            {  
                string domainRoot = GetDomainRoot();  
      
                if (!String.IsNullOrEmpty(domainRoot) && url.StartsWith("/") && (url.Length > 1))  
                {  
                    int index = url.IndexOf('/', 1);  
                    if (index > 0)  
                    {  
                        string parentPath = url.Substring(1, index - 1);  
                        if (parentPath.Equals(domainRoot))  
                        {  
                            return url;  
                        }  
                        else if (domains.ContainsValue(parentPath))  
                        {  
                            foreach (KeyValuePair<stringstring> pair in domains)  
                            {  
                                if (pair.Value.Equals(parentPath))  
                                {   
                                    HttpContext.Current.Response.Redirect(  
                                        String.Concat(HttpContext.Current.Request.Url.Scheme, "://", pair.Key, url));  
                                    break;  
                                }  
                            }  
                        }  
      
                    }  
                    return String.Concat("/", domainRoot, url);  
                }  
                return url;  
            }  

    Please let us know if you have further questions.

    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Mike
    Mike avatar
    22 posts
    Registered:
    05 Mar 2008
    18 Jun 2008
    Link to this post

    Vlad,

    Thanks for the response. That is in fact good information to know. My question now is the code that you posted is identical to the code you previously posted. Can you tell me what needs to change in order for this to work for me?


    thanks again,
    Mike

  12. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    19 Jun 2008
    Link to this post
    Hello Mike,

    Basically, you should add a default.aspx page as first child of your employee page.

    However, yes, the code I posted is identical to the previous one. I just marked the code snippet you should change to accomplish your goal. I don't know what are your requirements and settings in the IIS, so I cannot tell you what is the exact implementation.
    For example, if you want to open exactly employee page when requesting employee.xxx.org you should change the marked code with:

    if (url.Equals("/default.aspx", StringComparison.OrdinalIgnoreCase)) 
        return String.Concat("/", domainRoot, Telerik.Cms.Web.UrlHelper.PageExtension); 
    return String.Concat("/", domainRoot, url); 
     

    Hope this is helpful. Let us know if you need further assistance.

    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. Randel Bjorquist
    Randel Bjorquist avatar
    8 posts
    Registered:
    25 Jan 2008
    08 Sep 2008
    Link to this post
    I'm looking for some help with this.  I'm extremely new to Sitefinity and pretty new to just web development in general.  I've taken the files supplied by Vlad, placed them in my App_Code folder, made the modifications to the web.config file and attempted the the last change to the DomainUrlHelper.cs file, and I still don't get this to work.  I'm getting an "Internet Explorer cannot display the webpage".

    Right now, I have two websites (not virtual directories) setup in IIS, each pointing to the same local windows folder and I believe I have my Sitefinity project setup like explained above.  I do not have a root default page, but do have default pages for each "subfolder".

    I'm looking for any help/pointers to get me moving.
  14. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    09 Sep 2008
    Link to this post
    Hi Randel,

    You said that you have two websites. Actually this solution is regarding one website and more than one domain pointing to it. The main point is that you should have different domains (or sub domains) to request the same web application.
    Then, after setting the solution in your project, you have to define the website domains in the DomainUrlHelper class, i.e:
        public static class DomainUrlHelper  
        {  
            static DomainUrlHelper()  
            {  
                domains = new Dictionary<stringstring>();  
                domains.Add("www.domain1.com""domain1");  
                domains.Add("www.domain2.com""domain2");  
            }  
    ... 

    Please give us more details about the problems you have experienced.


    Kind regards,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. Randel Bjorquist
    Randel Bjorquist avatar
    8 posts
    Registered:
    25 Jan 2008
    09 Sep 2008
    Link to this post
    Hi Vlad,
    Thanks for the quick response and here is what I’m trying to do.  I have an organization “xxx” that I would like to split up into sections: “public”, “students”, “instructors”, etc …  and would like my access/web sites to be: “public.xxx.com”, “students.xxx.com”, “instructors.xxx.com”, etc …

    For the most part, the information belongs to one “authoritative” section/site.  There is however sections that will need to contain section specific information.  What is the best practice or recommended solution for this type of Sitefinity project?  

    The problem I’m having with the sub domain solution is that I’m having problems getting them to work and look like I want.  In my project, I have a couple pages Page Type set to Page Group: “public”, “student”, and “instructor”, each with default pages.  My URLs end up looking like: “public.xxx.com/public/default.aspx”, “students.xxx.com/students/default.aspx”, and “instructor.xxx.com/instructor.aspx”, instead of what I want them to be: “public.xxx.com”, “students.xxx.com”, and “instructors.xxx.com” respectfully.

    I am also starting to look at sharing the database between Sitefinity projects.  Again, what is Telerik’s best practice for this kind of site?  Is it the shared database or the sub domain solution?

  16. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    10 Sep 2008
    Link to this post
    Hi Randel,

    Seems the "Sub domains..." solution is appropriate to your scenario - you have several domains pointing to one web site, and each domain is mapped to a root-level page.
    Also you could use another approach with separate web sites and shared database.

    Unfortunately we cannot tell you what is the best way to build such kind of web site, because it depends on many factors which cannot be listed.

    Whichever solution you will choose we will be glad to help you if you have any problems.

    Sincerely yours,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  17. jas4on
    jas4on avatar
    11 posts
    Registered:
    07 Aug 2009
    02 Oct 2009
    Link to this post
    Are the methods described above still the only way to implement subdomains or has the functionality been added to v3.5+ releases of sitefinity?  If it hasn't been added, I'd like to vote for its inclusion soon.  I think sub and multiple domain support w/o custom code is pretty common standard feature in CMSs these days.

    Thanks
  18. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Oct 2009
    Link to this post
    Hi jas4on,

    We have plans to include similar functionality for 4.0. For the time being the only way to get subdomain support is using the code from this post, or better write your custom code.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  19. jas4on
    jas4on avatar
    11 posts
    Registered:
    07 Aug 2009
    02 Oct 2009
    Link to this post
    good deal....thanks for the quick response.
  20. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Oct 2009
    Link to this post
    Hello jas4on,

    Actually you could take a look at the following KB article - Domain-Page mapping. This works in 3.7 and it will do the trick. I hope this helps.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  21. jas4on
    jas4on avatar
    11 posts
    Registered:
    07 Aug 2009
    02 Oct 2009
    Link to this post
    much better solution than the custom code. Thank you!
  22. Steve
    Steve avatar
    10 posts
    Registered:
    14 May 2008
    01 Dec 2009
    Link to this post
    I have added the following to the web.config in the section described in the deployment article:
    <cms defaultProvider="Sitefinity" pageExtension=".aspx" siteTemplate="" ... blah, blah, blah...
       <urlMappings> 
      <add key="subdomain1.MySite.com" value="subdomain1" shared="true" /> 
      <add key="subdomain2.MySite.com" value="subdomain2" shared="false" /> 
       </urlMappings> 

    When I create the "landing pages" for these entries as it stands now, how should I configure them? Should they be pages created immediately off of the root of the Sitefinity site map tree view? Should they be listed in the Navigation (which is not desired)?

    I would like to know how I should be redirecting to these pages or is it automatic after entering the web.config data?

    Thanks,
    Steve
  23. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Dec 2009
    Link to this post
    Hello Steve,

    You need to create Cms pages that will be mapped to the domains/subdomains. You can hide the pages in the backend for user that does not belong to administrators role ( page permissions tab).

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  24. Steve
    Steve avatar
    10 posts
    Registered:
    14 May 2008
    01 Dec 2009
    Link to this post
    Ivan,

    Thanks for your quick reply:

    So if I understand you correctly, I should be able to just create a page named "subdomain1.aspx" just off of the "home" page and then just give it the proper authorization?

    I have selected "Show in navigation" = "No" and "Anonymous access" = "Deny" and when I surf to http://subdomain1.mysite.com I still get the main site's home page. So... I'm doing something wrong it appears.

    I have also created a URL at the bottom of the page settings and it reads "~/subdomain1/subdomain1.aspx". It is set to the default. Since the page is rendered on the fly, I thought that adding the mock folder name is essential.

    Am I understanding the concept correctly?

    It's just not working and this is my first stab at creating pages with subdomains. Please forgive my noobie questions....

    Steve

  25. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Dec 2009
    Link to this post
    Hi Steve,

    If you have a page called "subdomain1.aspx" with deny anonymous, not show in navigation and it is associated with subdomain1.mysite.com you have to be redirected to FormsAuthentication loginUrl. The only possible reason for the bahavior you exprience is:

    1. You do not use Sitefinity 3.7 where this logic is implemeted.
    2. You have not changed correctly your Hosts file as described in the KB article.
    3. Note that you have to use IIS server instead of ASP.NET Development server.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  26. Steve
    Steve avatar
    10 posts
    Registered:
    14 May 2008
    02 Dec 2009
    Link to this post
    Ivan,

    Thank you again for your rapid reply.

    Since my site isn't "live" yet (a work in progress) I have been doing this on DiscountASP.NET -- not locally. I paid DiscountASP.NET the fee for unlimited subdomains and received an IP address and some old VB (classic ASP) script code. 

    Since my last message, I tried making the page visible to others ( and now I am receiving an exception when I type in subdomain1.mysite.com. To me, that is progress because I'm not getting the home page now. <g>

    if the URL generated by Sitefinity for this page is ~/subdomain1.aspx will subdomain1.mysite.com work with my setup the way I described in the urlMappings section above? (i.e. "subdomain1.mysite.com", "subdomain1")

    I don't mean to be a pain, but sometimes I just can't help it <g>.

    BTW: I AM running Sitefinity 3.7 but not the latest SP1 version.

    Steve
  27. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Dec 2009
    Link to this post
    Hello Steve,

    The following web.config configuration should not be a problem. I am running it without problems.

    <urlMappings>
       <add key="subdomain1.domain.com" value="subdomain1" shared="true" />
       <add key="subdomain2.domain.com" value="subdomain2" shared="false"/>
    </urlMappings>


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  28. Steve
    Steve avatar
    10 posts
    Registered:
    14 May 2008
    02 Dec 2009
    Link to this post
    Ivan,

    Here is my message from later the same day (early evening or about 7:00 PM PST):

    Now that I have created custom templates, my problem is solved! I can now link to regular HTML pages too. This is sparking some excellent ideas too!

    Thank you to the great programming staff of Telerik/Sitefinity for providing this simple and easy solution! Once I got the hang of it, it was like "falling off a log" (easy to do).

    Here is my message from early this morning (5:30 AM PST (or UTC -8) I believe):

    I am now receiving an object error related to a custom membership control on my template I used that is making an assumption (incorrectly I might add... which is my fault). I will try some other things and get back to you.

    Thanks again for your help. I think I'm on the way to resolving the problem.
  29. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    22 Dec 2009
    Link to this post
    I haven't read through this thread entirely, so forgive me please if this was already mentioned.

    If your subdomain starts on a page group, be sure to include the correct child page in the mapping. our subdomain is sub.site.com but it maps to site.com/sub/default.aspx

    as a result, when we mapped to just sub it keep redirecting forever.

    switching the mapping to sub/default fixed the issue immediately (this is on 3.7 SP1)

    <add key="sub.site.com" value="sub/default" shared="false" /> 

    thought I'd add this here in case anyone else has the same problem.
  30. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    22 Dec 2009
    Link to this post
    okay I've been playing with this for a little bit longer and I've hit a snag...

    how do I get "out" of the subdomain? our sitemap doesn't match up with our site navigation menu; we built that manually. so links in the site menu will be linked to /default.aspx for the site home page. however, since this is in the domain-mapped section, it's of course mapping inistead to sub.site.com/default.aspx, which is really site.com/sub/default.aspx

    it appears that there is no way I can use this solution if I have manual links that are relative to the SITE root. am I correct?
Register for webinar
46 posts, 0 answered
1 2