Copied to clipboard

Flag this post as spam?

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


  • Christian borg Petersson 3 posts 73 karma points
    Oct 15, 2018 @ 12:57
    Christian borg Petersson
    0

    301 url tracker returns 404

    I have been searching this forum for a solution to my problem but can’t seem to find one.

    My client's problem is that none of the autogenerated redirects works, it only returns 404. The strange thing is that if I check force redirect it works even if I uncheck it again after saving. We use v. 3.11 of url tracker and Umbraco v 7.9.2.

    We don’t have this problem in our dev environment or test server so can’t really pin point the problem.

    I’m thankful for any help I can get.

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Oct 15, 2018 @ 22:36
    Marc Goodson
    0

    Hi Christian

    There is a an issue tracker for Url Tracker here: https://github.com/kipusoep/UrlTracker

    And there is a later version of UrlTracker available via NuGet: https://www.nuget.org/packages/UrlTracker/

    (3.15)

    Essentially though, when you force a redirect, the redirect is 'looked for' before the request is handled by Umbraco, once you've received that redirect it will cache in your browser, so that is how sometimes it can seem like the redirect is still happening, after you have unforced it.

    I tend to use this site to test redirect issues:

    http://www.redirect-checker.org/index.php

    to be clear on what is being redirected (you'll see if multiple redirects are occurring etc)

    Anyway, if you can add a brand new url for redirecting, without forcing, and it redirects ok, then the likely problem with the one that 'won't redirect' unless you force it is that there is an existing entry in the UrlTracker database table that is taking precedence over your new url.

    You'd expect more recently created redirects to always take precedence over previously created one, but that isn't always the case, so suggest one line of investigation is to look in the UrlTracker database table for any other entries (could be 404 tracking entry) for the url you are trying to redirect, and if you find any, manually remove them.

    regards

    Marc

  • Christian borg Petersson 3 posts 73 karma points
    Oct 16, 2018 @ 13:01
    Christian borg Petersson
    0

    After checking the url tracker table in the db I can see why it won’t redirect but don’t know how to fix it. The column RedirectNodeId is null. Even if I create a new redirect it still writes null on the RedirectNodeId column. In my dev environment and test server it writes the nodedi of the page that it redirects to also the column Is404 is set to false on all redirects in dev and test but the opposite in production where it is set to true. Maybe I should start an issue on their github page instead.

  • Christian borg Petersson 3 posts 73 karma points
    Oct 16, 2018 @ 07:44
    Christian borg Petersson
    0

    Thanks for your replay.

    If I create a new redirect I get 404. It sill start working if I check force. The strange thing is that it works on test server and dev environment without any problems. I will follow your advice an check the database to se if there is something there that causes the problem.

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Oct 17, 2018 @ 08:29
    Marc Goodson
    0

    Hi Christian

    Yes, so what that means is an earlier request was made to your production site before the redirect was in place.

    You have UrlTracker setup to track 404 redirects

    So that created an entry in the database table in production for your particular Url - and it's marked as being Is404.

    You'd expect that creating a new redirect for this url would take precedence over the earlier 404 entry, but it doesn't (not consistently)

    So if you completely delete from the database your earlier 404 entry.

    Trigger an application pool recycle

    Then your new redirect should work.

    regards

    Marc

    NB if you are not 'doing anythign' with the 404 information that UrlTracker is storing, you could delete all the 404 entries... there will be millions, as one is created for each 404!

    There is an appsetting to turn the functionality off:

    <add key="urlTracker:notFoundTrackingDisabled" value="true" />
    

    If you keep the 404 tracking functionality then consider ignoring common 404 requests eg

Please Sign in or register to post replies

Write your reply to:

Draft