Copied to clipboard

Flag this post as spam?

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


  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Oct 12, 2021 @ 12:37
    Markus Johansson
    0

    Disable trailing slash for path or method

    Hi Richard!

    I'm using SEO Checker on a website that also have a web api configured.

    So a PATCH request to /api/products/1 would be redirected to /api/products/1/ which does not route to the right endpoint.

    Is there a way to disable the force trailing slash-settings ie. for /api/ ? Or maybe for PATCH-methods? It looks like POST-method does work.

    // m

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Oct 12, 2021 @ 12:40
    Richard Soeteman
    100

    Hi Markus,

    If you add the /api/ url to Umbraco.Core.ReservedUrls setting it should be ok again. Alternative you can also add /api/* to app_plugins/seochecker/config/botfilter.config

    Hope this helps,

    Richard

  • Erik Engstrand 9 posts 80 karma points
    Sep 21, 2022 @ 12:42
    Erik Engstrand
    0

    I have a similar problem here with normal ASP.NET bundles like "/bundles/css/non-critical?v=" that redirected to "/bundles/css/non-critical/?v=" which results in a 404.

    I have "~/bundles/" in "Umbraco.Core.ReservedPaths" already, which doesn't work. Also tried to add "~/bundles/" to "Umbraco.Core.ReservedUrls" but no luck there either.

    Version of SEO Checker: 2.11.2

    Any ideas?

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 23, 2022 @ 09:22
    Richard Soeteman
    0

    Hi Erik,

    This did the trick for me.

    <add key="Umbraco.Core.ReservedPaths" value="/bundles/" />
    
  • Erik Engstrand 9 posts 80 karma points
    Sep 23, 2022 @ 09:33
    Erik Engstrand
    0

    I think I have tried every different path now and still doesn't work.

    /bundles/css/non-critical?v=TxvBE6HNcv0-FfivwjS0Mof41D7aTN3LXLNpz5ESinE1 gets a 301 to /bundles/css/non-critical/?v=TxvBE6HNcv0-FfivwjS0Mof41D7aTN3LXLNpz5ESinE1

    Which Umbraco version do you have? I have Umbraco 8.18.5.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 23, 2022 @ 09:35
    Richard Soeteman
    0

    8.14 But should be the same. 301 redirects are cached byu the browser so that might be the issue as well.

  • Erik Engstrand 9 posts 80 karma points
    Sep 23, 2022 @ 11:54
    Erik Engstrand
    0

    It actually works if you only have

    <add key="Umbraco.Core.ReservedPaths" value="/bundles/" />
    

    or

    <add key="Umbraco.Core.ReservedPaths" value="~/bundles/" />
    

    but not if you have a comma separated list which should be supported

    <add key="Umbraco.Core.ReservedPaths" value="~/umbraco,~/install/,/bundles/,~/__browserLink/,~/.well-known" />
    

    So there seems to be a bug around this.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 27, 2022 @ 16:01
    Richard Soeteman
    0

    Hi ERik,

    Is fixed for next release. Beta can already be used https://www.nuget.org/packages/SEOChecker/2.11.4-beta2

    Hope this helps,

    Richard

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Oct 13, 2021 @ 08:10
    Markus Johansson
    0

    Thanks for the fast response Richard!

    ReservedUrls did the trick =D

    // m

Please Sign in or register to post replies

Write your reply to:

Draft