Copied to clipboard

Flag this post as spam?

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


  • Michael Nielsen 82 posts 362 karma points
    Jul 10, 2013 @ 14:04
    Michael Nielsen
    0

    Auto redirect /NodeId to /NiceUrl

    I found out/had forgotten that you can access a page with the url /NodeId (using folder urls)

    Please tell me there is a way to avoid this as it's a presents a huge duplicate content issue. 

    I've searched but not found any solution to automatically redirect the nodeid urls to the real urls.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 10, 2013 @ 14:27
    Jan Skovgaard
    0

    Hi Michael

    In my experience this is not neccesarily an issue if no one links to the pages since the search bots can't follow the links to them and therefore won't index them.

    But if the accident has happened you should be able to install and use the 301 infocaster redirect package, which you find here http://our.umbraco.org/projects/developer-tools/301-url-tracker - Then you can setup pages that this non-wanted page should 301 redirect to instead.

    Hope this helps.

    /Jan

  • Michael Nielsen 82 posts 362 karma points
    Jul 10, 2013 @ 14:40
    Michael Nielsen
    0

    Hi Jan

    It's true that the damage is first done if Google indexes the pages with nodeid's, but in my opinion a CMS should never allow 2 urls to the same page no matter what.

    And unfortunately a junior developer has not been aware and use library.niceurl or node.url in his razor code, so  we have some sites where pages with nodeid's has been indexed by Google.

    I know I could redirect the affected pages, but I am looking for an automated solution, also to avoid these things in the future.

     

  • Michael Nielsen 82 posts 362 karma points
    Jul 10, 2013 @ 14:45
    Michael Nielsen
    0

    And the 301 Url tracker package does not seem work in this case.

    I entered the nodeid as url, but nothing happened.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 10, 2013 @ 14:52
    Jan Skovgaard
    0

    Hi Michael

    Did the package install without any errors? Have you checked that there has been created some infocaster tables in the database?

    /Jan

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jul 10, 2013 @ 15:19
    Stefan Kip
    0

    It won't work with the Url Tracker (thanks for suggesting it Jan ;-) ), because the Response status has to be 404 for the Url Tracker to do something...
    The HttpModule only kicks in when umbraco didn't find a page to render. Maybe you can write your own HttpModule?

  • Michael Nielsen 82 posts 362 karma points
    Jul 10, 2013 @ 15:25
    Michael Nielsen
    0

    Hi Jan

    Yes and no... The package was already installed, but I know there is some issues with the package in v6, so we've also stopped installed it on new sites.

    I could also setup an URLRewrite to the /404 page for all nodeid urls.

    But as I said, I'm looking for a more automated solution. Something that could be used on future sites to avoid this problem.

    I really hope the Umbraco team will change this behaviour in the core.

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jul 10, 2013 @ 15:28
    Stefan Kip
    2

    @Michael
    The new version (2.x) works great in umbraco v4.6 and up, which includes v6.x as well :-)

    I agree nodeId URLs are unwanted and should be disabled by default. Have you considered creating an issue ticket?

  • Michael Nielsen 82 posts 362 karma points
    Jul 11, 2013 @ 10:20
    Michael Nielsen
    0

    Well the solution for me was to add this to UrlRewriting.config

    <add name="nodeidrewrite" virtualUrl="^~/([0-9]{4})/?(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/404" redirectMode="Permanent" ignoreCase="true" />

    Nodeid urls will now return a 404 page, at least that will solve the duplicate content issue.

    And I have created an issue ticket.
    http://issues.umbraco.org/issue/U4-2499

    kipusoep: I can see that you made it even better. I have some upgrading to do now :-)

Please Sign in or register to post replies

Write your reply to:

Draft