Copied to clipboard

Flag this post as spam?

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


  • mmmoustache 50 posts 79 karma points
    Feb 15, 2014 @ 18:17
    mmmoustache
    0

    Top level node 301 redirect to sub-page

    Hi all,

    Usually I use the umbracoRedirect alias to create a 302 redirect, using a content picker datatype to select the destination page. However, I'm trying to figure out how to do this with a permanent, 301 redirect but I'm having no luck whatsoever. I edited the UrlRewriting file in the config folder using the example in the file:

    <add name="urlrewrite" 
        virtualUrl="^~/" 
        rewriteUrlParameter="ExcludeFromClientQueryString" 
        destinationUrl="~/subpage.aspx" 
        ignoreCase="true" />


    This does indeed redirect domain.com to domain.com/home using a 301, but every other page is 404'd. What's the easiest way to 301 redirect the top level page to /
    subpage.aspx?

    Thanks!

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Feb 15, 2014 @ 20:59
    Andy Butland
    100

    Try as you have but with virtualUrl="^/(\?|$)"

    Andy

  • 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