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

Forums / Developing with Sitefinity / Sub domains...

Sub domains...

46 posts, 0 answered
  1. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 Dec 2009
    Link to this post
    Hello SelArom,

    The mapped CMS page behaves as a root of the site. You can use <page_path> to specify a subpage of the mapped page - say /sub/default.aspx. Possible solution could be creating a custom urlMappings

    <urlMappings type="Custom" customService="MyCustomService, App_Code" type="Custom">
        <add key="Sdomain1" value="Page1" />
        <add key="Sdomain2" value="Page2" />
    </urlMappings>

    In your custom class you have to override GetKey(HttpContext context) method and return the sub directory path instead of the Host component.

    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.
  2. William Diaz
    William Diaz avatar
    5 posts
    Registered:
    01 Oct 2009
    31 Dec 2009
    Link to this post
    How I can impletement the above but with the persistenceMode="PathPrefix" enabled?

    The domain is showing with out any problems but the subdomain is adding the en prefix and display page not found:

    <

    urlMappings>

     

    <

    add key=www.domain.com value="domain" shared="true" />

     

    <

    add key="subdomain.domain.com" value="subdomain" shared="false" />

     

    </

    urlMappings>

     

  3. ft_wg
    ft_wg avatar
    1 posts
    Registered:
    23 Dec 2009
    04 Jan 2010
    Link to this post
    Hello,

    similar to other users, I want to use one sitefinity instance in order to handle several sub-sites, each having its own navigation structure.

    Example:

    subdomain1.mysite.com ==> Sitemap1 (pages A,B,C)
    subdomain2.mysite.com ==> Sitemap1 (pages A,B,C)
    subdomain3.mysite.com ==> Sitemap2 (pages A,C,D)
    subdomain4.mysite.com ==> Sitemap2 (pages A,C,D)
    subdomain5.mysite.com ==> Sitemap3 (pages E,F)

    I want to enable cms admins/editors to define the assignment of pages to sitemaps.

    After some research i figured the best solution would be to assign roles (never being assigned to users, just as a grouping mechanism) to the pages and use a custom SitemapProvider to filter sitemap nodes according to a subdomain-(1:1)->role-(m:n)->page mapping.

    In order to do this I need access to the roles assigned to a sitemap node. In a preliminary test I used the following code in a standalone aspx page within a siteinity website to test this:

    1 CmsSiteMapProvider provider = CmsSiteMap.Provider;  
    2  
    3 SiteMapNode p = provider.RootNode;  
    4 SiteMapNodeCollection c = provider.GetChildNodes(p);  
    5  
    6 foreach (CmsSiteMapNode item in c)  
    7 {  
    8     Response.Write(item.Title);  
    9       
    10     if (item.Roles != null)  
    11         foreach (var role in item.Roles)  
    12         {  
    13             Response.Write(role.ToString());  
    14         }  
    15     Response.Write("<br />");  
    16

    The problem is, that item.Roles is always null and I cannot find out why.

    So my questions are:
    1) How can I find out the roles assigned to Sitemap Nodes?
    2) Is there a better approach to achieve what I am trying to do?

    Thank you very much,
    Florian


  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Jan 2010
    Link to this post
    Hi William Diaz,

    I checked similar scenario at my end using Sitefinity 3.7 SP2 and there were not any problems using PathPrefix for persistenceMode. Does the problem persists if you set persistenceMode to None?

    Generally the result with localization should be www.domain.com/en/ and subdomain.domain.com/en/

    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.
  5. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    03 Feb 2010
    Link to this post
    The SiteMapProvider provided by Vlad seems to work, but the site itself doesn't seem to redirect to the correct sub page. It's still stuck on the root home page.

    I'm implemented all code as suggested and added the sub-domains as told, but the normal home page of the site is appearing except with a limited navigation (as expected).

    Why is the page not redirecting?

    Regards,
    Jacques
  6. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    03 Feb 2010
    Link to this post
    We have some real concerns about Sitefinity performance so I wanted to ask the obvious here.

    Does the code provided above affect performance? Would it reduce the speed of page loads?

    And I'm still not able to get the page to redirect to the page group. Any help in that regard?

    Regards,
    Jacques
  7. bleutiger
    bleutiger avatar
    153 posts
    Registered:
    23 Oct 2008
    02 Sep 2010
    Link to this post
    I realize this is an old post but toward the end of this post it is talking about what I am trying to do on my site.

    Hello,
      
    similar to other users, I want to use one sitefinity instance in order to handle several sub-sites, each having its own navigation structure.
      
    Example: 
      
    subdomain1.mysite.com ==> Sitemap1 (pages A,B,C)
    subdomain2.mysite.com ==> Sitemap1 (pages A,B,C)
    subdomain3.mysite.com ==> Sitemap2 (pages A,C,D)
    subdomain4.mysite.com ==> Sitemap2 (pages A,C,D)
    subdomain5.mysite.com ==> Sitemap3 (pages E,F)


    can anyone tell me how this can be done?
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Sep 2010
    Link to this post
    Hello bleutiger,

    I have sent a response to you in the support ticket you have opened with this issue. For the convenience of other users facing the same issue you can find my response bellow:

    What you can do, in the case that you do not want to list pages from the Main Site map , is to use Sitefinity's API to get pages then bind your results to RadSiteMap control for example. You can find more information on how to get pages through the API here: Finding Pages.

    Bellow is an example on how you can get all navigable pages order by the same way they are ordered in the sitemap:

    Copy Code
    CmsManager cmsManager = new CmsManager();
    List<ICmsPage> pages = cmsManager.GetPages().Cast<ICmsPage>().Where(t => t.Navigable = true).ToList();
    pages.Sort((x, y) => x.Ordinal.CompareTo(y.Ordinal));


    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    26 Nov 2010
    Link to this post
    Hi my client would like to have a subdomain that looks like

    www.subdomain.domain.com

    Is this something Sitefinity supports or should it be subdomain.domain.com?

    Thanks!
    Devin
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Nov 2010
    Link to this post
    Hi Devin,

    Configuring domains and subdomains has to be done through your host control panel and IIS. Sitefinity is CMS website application that allows you to build the content of the website.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    30 Nov 2010
    Link to this post
    Maybe this has been answered but i am not sure what method to use.

    I have my main domain and site navigation.

    We have added a subdomain. (configured in IIS and mapped in the web.config)
    This subdomain points to say - www.domain.com/subdomain/
    where subdomain is a pagegroup.

    When on the pages within this pagegroup say  subdomain.domain.com/home.aspx we would like the main navigation links (Rad Menu) to keep pointing to the main domain (www.domain.com) However, I assume that since these page links are generated dynamically, it takes what the domain in the browser is and creates the navigation link that way.  So what was www.domain.com/about_us.apsx is now subdomain.domain.com/about_us.aspx when you are in any sub-pages under the /subdomain/ folder.

    How do I keep the navigation links the same as in the main site but on a subdomain page?
    Thank you.
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Nov 2010
    Link to this post
    Hi Laura,

    The SiteMap is split depending on the urlMapping value set in the web.config. You could create a custom menu populated by list of pages returned by CmsManager.GetPages() method instead of using the SiteMap.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    03 Dec 2010
    Link to this post
    Hi does Sitefinity support the form subdomain.testsite.stagingserver.com?

    Thanks!
    Devin
  14. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Dec 2010
    Link to this post
    Hello Devin,

    If you have a license key for stagingserver.com there would not be a  problem.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    14 Dec 2010
    Link to this post
    OK thanks, I'll work on this.
  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Dec 2010
    Link to this post
    Hi Devin,

    In this case you need a key for liveserver.com. The other are subdomains of it.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
46 posts, 0 answered
1 2