Copied to clipboard

Flag this post as spam?

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


  • Peter Kvayt 5 posts 45 karma points c-trib
    May 30, 2024 @ 12:29
    Peter Kvayt
    0

    Error "ERR_TOO_MANY_REDIRECTS" in browser

    Hi!

    I faced with issue "ERRTOOMANY_REDIRECTS" in browser when I tried to open page.

    I am using umbraco 10.8.1 and SEOChecker 10.0.5.

    After investigation I found out the following: this behaviour was caused by enabling "RedirectWhenNodeExists" setting in RedirectConfig ("Redirect when node exists" setting in backoffice). This setting allows SEOChecker.Providers.UrlProviders.UrlRewriteRedirectsProvider.RewriteUrl to rewrite Url, but in some cases it creates an endless loop of redirects.

    Steps to reproduce:

    1. Create fresh umbraco app (10.8.1)
    2. Install SEOChecker (10.0.5)
    3. Go to SEO tab -> Settings -> General Settings -> Redirect Settings and enable "Redirect when node exists" option
    4. Create doc type Foo (whatever) and allow it as root and allow create Foo doc type under Foo doc type
    5. Create Foo node as root in content tree and name it as "Root", save it and publish
    6. Under "Root" node create new Foo node "Test", save it and publish (note: url to page is "/test")
    7. Open "/test" in broser and make sure page works like a charm
    8. Rename node "Test" to "Test 1" (note: url to page become "/test1")
    9. Open "/test1" and make sure page works like a charm
    10. Rename node "Test 1" to "Test" (note: url to page become "/test", and now there are two url redirects: "/test", "/test1")
    11. Open "/test1" and there is an error in browser: "ERRTOOMANY_REDIRECTS"

    To fix this issue I can suggest do not to store redirects if them have the same urls. Maybe I am wrong, but as I can see it is not good behaviour out of the box.

    Thanks!

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 04, 2024 @ 07:47
    Richard Soeteman
    100

    Hi,

    You need to make sure a page can't redirect to a page that will redirect to the previous page.

    Best, Richard

  • Peter Kvayt 5 posts 45 karma points c-trib
    Jun 05, 2024 @ 08:59
    Peter Kvayt
    0

    Hi, thanks for the response!

    Do you mean I need do this in backoffice manually?

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 05, 2024 @ 09:00
    Richard Soeteman
    0

    Yes indeed filter on the url that gives you a list of the redirects to/from the page

  • Peter Kvayt 5 posts 45 karma points c-trib
    Jun 05, 2024 @ 11:53
    Peter Kvayt
    0

    So correct me if I wrong, this behaviour is correct behaviour and you willl not do fix to resolve this problem?

    Best regards!

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 05, 2024 @ 12:00
    Richard Soeteman
    100

    With the redirect when node exists it is next to impossible to track if a page that is being redirected redirects to another page that redirects back.. The pages are not the same so for now that is indeed not something I can fix.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft