Copied to clipboard

Flag this post as spam?

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

  • Gregory 37 posts 127 karma points
    Nov 28, 2018 @ 14:06

    URL Rewrite - Sitemap not working

    Hi there,

    Using Umbraco Cloud 7.12.4

    I am creating a dynamic sitemap via a macro. The sitemap is using the URL /sitemapxml

    I am trying to create a rewrite rule in the web.config to redirect /sitemap.xml to /sitemapxml

    I currently have the following:

    <rule name="Sitemap XML" enabled="true" stopProcessing="true">
                <match url="sitemap.xml" />
                <action type="Rewrite" url="sitemapxml" appendQueryString="false"/>

    The above does not seem to work. Obviously doing something wrong here, but after searching on the web for ages, I cannot quite figure out what the issue is.

    Also I have a few additional rules in my config file (for non www and https redirects).

    Any assistance would be much appreciated.

  • Dave Woestenborghs 3233 posts 10957 karma points MVP 5x admin c-trib
    Nov 28, 2018 @ 14:54
    Dave Woestenborghs

    Hi Gregory,

    I have the following rewrite. My dynamic one is called /sitemap so you need to change that

    <rule name="Sitemap.xml rewrite" stopProcessing="true">
              <match url="^sitemap.xml$" />
              <action type="Rewrite" url="/sitemap" appendQueryString="false" />

    So the match is regex and the rewrite url starts with /


  • Gregory 37 posts 127 karma points
    Nov 28, 2018 @ 16:48

    Thanks a lot for that Dave.

    It is now working.

Please Sign in or register to post replies

Write your reply to: