Copied to clipboard

Flag this post as spam?

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


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 11, 2012 @ 14:48
    Jan Skovgaard
    0

    uComponents: 301 Moved Permanently handler

    Hi everyone

    Can someone explain to me in simple terms how the 301 Moved permanently handler is supposed to work?

    I have read through the documentation her: http://ucomponents.codeplex.com/wikipage?title=SearchFor301MovedPermanently&referringTitle=Documentation but I must admit that I still don't get it.

    • When adding the umbraco301MovedPermanently alias, what datatype should be selected? Content picker or a textstring? (I've tried both, but no cigar)
    • When the property has been added how is it intended to be used? Should the page that should redirect to another page still be published or should it be unpublished?
    When I unpublished the page where I had setup the property (using a content picker) and I tried to request the ubpublished page I got my custom 404 page, which is set in the umbracoSettings.config
    My 404handlers.config file looks like this
    <?xml version="1.0" encoding="utf-8"?>
    <NotFoundHandlers>
      <notFound assembly="umbraco" type="SearchForAlias" />
      <notFound assembly="umbraco" type="SearchForTemplate" />
      <notFound assembly="umbraco" type="SearchForProfile" />
      <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchFor301MovedPermanently" />404
      <notFound assembly="uComponents.Core" type="NotFoundHandlers.MultiSitePageNotFoundHandler" />
      <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchFor404ContentHandler" />
      <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchForPageNotFound" />
      <notFound assembly="umbraco" type="handle404" />
    </NotFoundHandlers>
    Cheers,
    Jan

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    May 11, 2012 @ 15:10
    Morten Bock
    3

    I'm guessing, but if I read it correctly, then the page you want to redirect TO should have that property, and the value should be a string containging the old url that you want to redirect FROM. ?

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 11, 2012 @ 15:36
    Chriztian Steinmeier
    1

    Hi Jan,

    Morten is right - the property should be a textstring wherein you put the URL (e.g.: /tutorials/muenchian) of a page that you're about to trash (or as it were on the previous version of the site, usually) - so that future requests for that URL gets a 301 Redirect with the location of the node containing the property...

    Makes sense?

    /Chriztian

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 12, 2012 @ 23:12
    Jan Skovgaard
    0

    Hi Morten and Chriztian

    Ah yes, of course that makes perfect sense. However when I tried doing as described above yesterday I had no luck. But I'm about to give it a spin on a fresh demo-install once again to see if I can make it work.

    I'll get back to you guys later.

    Cheers,
    Jan

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    May 12, 2012 @ 23:13
    Bo Damgaard Mortensen
    0

    As a follow up in Jans question, do the uComponents 301 permanently moved handler support other extensions than ".aspx" ? Such as ".html" and/or ".php" ? Asking because the all famous 301 URL Tracker package doesn't support it :-)

    Thanks in advance.

    - Bo

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 12, 2012 @ 23:51
    Jan Skovgaard
    0

    @Chriztian and Morten - you guys were totally right :)

    It also makes perfect sense that it is working this way. This handler is just ace!

    However I think it should be explicitly stated that the datatype should be a "textstring" - must admit I missed the explanation about this working in the same way as the umbracoUrlAlias when I first came across the documentation and in a comment I saw a guy who had been using a content picker, which really does'nt make sense but created a bit confusion in my mind.

    /Jan

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 13, 2012 @ 00:29
    Lee Kelleher
    0

    @Bo, support for other file extensions depends on your IIS set-up. Meaning that if those extensions are passed through to the ASP.NET pipeline; then Umbraco would pick them up and try to handle them.

    Thanks to Morten & Chriztian for answering the original question #h5yr!

    Cheers, Lee.

  • Zakhar 171 posts 397 karma points
    Oct 30, 2014 @ 13:37
    Zakhar
    0

    Hi guys,

    I can see this is and old topic, but I'm trying to do exactly this in Umbraco 6.1.6 and nothing happens.

    As a test I have a page with url /products, I entered prdcts to the umbraco301MovedPermanently field of this page, but when I browse /prdcts I get my usual 404 page.

    Any suggestions?

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Oct 30, 2014 @ 13:42
    Chriztian Steinmeier
    0

    Hi Zakhar,

    Just to be sure: You have uComponents installed in that site, right? (It's not totally obvious if you've searched for this functionality, especially because they've used the umbraco prefix for a custom property).

    If you have indeed installed uComponents, I guess you should look into the order of the NotFound handlers in the web.config (I guess?).

    /Chriztian

  • Zakhar 171 posts 397 karma points
    Oct 30, 2014 @ 13:55
    Zakhar
    0

    Hi Chriztian,

    uComponents is included in core in 6.1.6, I didn't install it specifically, but I do use other uComponents methods and they work. The property alias is "umbraco301MovedPermanently" and I added <notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchFor301MovedPermanently" /> to 404handlers.config (first position).

    Do I have to update web.config too?

    Just want to add that I also have "umbracoUrlAlias" property and it works fine.

    Thank you

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Oct 30, 2014 @ 14:07
    Chriztian Steinmeier
    0

    Hi Zakhar,

    Of course this is included - my bad :-(

    No need to tinker with the web.config I think, but then I don't really have any other ideas as to where it's going wrong...

    Which version of IIS are you using? I know these 404-handler-thingy-majiggy things need IIS to be in "Integrated Mode" (whatever that is :-).

    /Chriztian

  • Zakhar 171 posts 397 karma points
    Oct 30, 2014 @ 14:43
    Zakhar
    0

    I'm using IIS 8.5 and the app pool is running in integrated mode.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 30, 2014 @ 17:23
    Jan Skovgaard
    0

    Hi Zakhar

    Do you have any other 3rd party stuff installed like the SEO package from Richard Soteman or the Url tracker for instance? These might interfere with the handler perhaps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft