Copied to clipboard

Flag this post as spam?

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


  • André Lange 108 posts 410 karma points
    Oct 31, 2016 @ 08:44
    André Lange
    1

    Umbraco 7 redirect internal page

    Hi, i am new to umbraco, and have a small problem, with redirect.

    i have a parent page " news-media" with two sub pages "news" & "media".

    when i press "news-media" i would like to redirect to "news".

    "news-media" is an empty page.

    but haven't been able to figure out a way to do this..

    any help would be greatly apreciated.

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Oct 31, 2016 @ 09:05
    Dennis Adolfi
    105

    Hi André.

    In the Settings section, for the Document Type for "news-media", create a new property of type ContentPicker, with the alias umbracoInternalRedirectId. See example image:

    enter image description here

    Then in your Content section, for your "news-media" node, select the "news" page for the umbracoInternalRedirectId value. See example image:

    enter image description here

    This should make sure that when someone browse the "news-media" node, they will be automaticly redirected to "news".

    The umbracoInternalRedirectId property will not change the URL when it redirects, thereby leaving it /news-media. If you want the URL to change to /news-media/news, then use the umbracoRedirect alias instead, but still with a Content Picker.

    Best of luck to you!!

    If you are interested in reading more, see: https://cultiv.nl/blog/umbraco-tip-of-the-week-redirects/. Its an old article, but it still works the same. :)

  • Cristhian Amaya 52 posts 423 karma points
    Aug 22, 2017 @ 09:20
    Cristhian Amaya
    0

    Fantastic answer, Dennis.

    Just to add my 2 cents, the umbracoRedirect alias does a 302 redirect which might not be what you want. If you need a 301 redirect, your best option is IIS URL Rewrite

    Cheers!

  • André Lange 108 posts 410 karma points
    Oct 31, 2016 @ 09:15
    André Lange
    1

    that works perfectly.

    Thank you, for the detailed answer :D

  • Dennis Adolfi 1082 posts 6450 karma points MVP 6x c-trib
    Oct 31, 2016 @ 09:19
    Dennis Adolfi
    0

    Thank you André! Have a great day!

  • 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