More in this section

Forums / Developing with Sitefinity / <urlMappings> problems

&lt;urlMappings&gt; problems

3 posts, 0 answered
  1. Isaac
    Isaac avatar
    63 posts
    01 Dec 2008
    08 Aug 2011
    Link to this post
    My current sitemap:
    ...index (marked as homepage)

    I have set up 2 urls:

    in my web.config
       <add key="" value="second-site-root" shared="false" />

    I'm attempting to utilize the sitemap to custom build navigation based on whatever is returned from this call:
    CmsSiteMapNode siteRoot = (CmsSiteMap.Provider.RootNode as CmsSiteMapNode);

    Where any page from the 'regular' will return the SitemapRoot, and any page from the will return the 'second-site-root' as its root node.

    When I hit I get served the expected page from the sitemap. however when I hit I get served the home page from the 'regular' site. <-- works <-- works

    I thought for sure it was just a problem with the defaultdocument settings in IIS7.5 but I believe I cleared them all out with this entry:
       <defaultDocument enabled="true">
             <clear />
    Even with this, the behavior continues.
    Did I set up the <urlMappings> incorrectly?
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    30 Oct 2017
    11 Aug 2011
    Link to this post
    Hi Isaac,

    Please take a look at this KB article, I believe you might find it useful. If you have some additional questions, please do not hesitate to let us know.

    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Isaac
    Isaac avatar
    63 posts
    01 Dec 2008
    11 Aug 2011
    Link to this post
    I believe the default urlMapping service will work as advertised. I believe my problem is stemming from some internal url forwarding or whatever the appropriate term for it might be.

    I followed another post on the forum to disable some of the sitefinity url rewriting in favor of the iis7 url rewriter with this:
    public class CustomCmsHttpModule : CmsHttpModule
        protected override CmsRequest GetCmsRequest(HttpContext context)
            return new CmsRequest(context.Server.UrlDecode(context.Request.Url.PathAndQuery));
    This has worked excellently except for one small problem i cant seem to track down.

    A request to or will get 301 redirected to my homepage in sitefinity (homepage is named mysite-root.aspx -- I named it something strange because i wanted to eliminate the possibility that defaultDocuments was somehow responsible even though my sys admin assured me they are not turned on).

    Anyway, what further methods do I need to override so that and will 404 like I want them to?
Register for webinar
3 posts, 0 answered