Copied to clipboard

Flag this post as spam?

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


  • Kasper 12 posts 95 karma points
    Aug 05, 2018 @ 10:06
    Kasper
    0

    Redirect old URLs Umbraco / Unoeuro

    In previous versions of Umbraco I have been using the "UrlRewriting.config" to redirect old URLs fx "/contact-page.php" to "/contact".

    As "UrlRewriting.config" is deprecated, how do i redirect old URLs?

    I have been reading about the topic, and IIS rewriting should be the right way to do it.

    But is it possible to solve the problem in another way, and does anyone have experience with IIS rewriting at Unoeuro?

    // Kasper : )

  • Ben Palmer 180 posts 866 karma points c-trib
    Aug 05, 2018 @ 10:27
    Ben Palmer
    100

    Hi Kasper,

    I've made use of two methods in the past:

    1) Use a redirect manager such as Simple 301

    2) Use Rewrite Maps, putting something like the following in your Web.Config file:

    <rewrite>
        <rewriteMaps>
            <rewriteMap name="StaticRewrites" defaultValue="">
                <add key="/article1" value="/article.aspx?id=1&amp;title=some-title" />
                <add key="/some-title" value="/article.aspx?id=1&amp;title=some-title" />
                <add key="/post/some-title.html" value="/article.aspx?id=1&amp;title=some-title" />
            </rewriteMap>
        </rewriteMaps>
    </rewrite>
    

    I'm not sure how possible these methods are at Unoeuro but this is the way I'd normally handle things.

    Hope that helps,

    Ben

  • Kasper 12 posts 95 karma points
    Aug 05, 2018 @ 11:13
    Kasper
    0

    Simple 301 works like a charm on my Umbraco 7.7.7 installation at Unoeuro...

    Thank You mate. :)

  • Kristian Larsen 2 posts 20 karma points
    Aug 07, 2018 @ 08:10
    Kristian Larsen
    0

    Hi Kasper,

    Simple 301 - was it easy to work with? It seems like it did the job for you!

Please Sign in or register to post replies

Write your reply to:

Draft