Copied to clipboard

Flag this post as spam?

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


  • Meni 264 posts 500 karma points
    Apr 08, 2024 @ 18:03
    Meni
    0

    Custom routing at Umbraco13?

    Hi, I need to have some pages that external to my Umbraco website.

    Which means, I need something like: myumbracosite.com/external-url

    So I can create a folder on the ftp: /external-url

    and to be able to navigate to this folder

    but I'm getting page not found

    in the past I could do it through the web.config

    How do I do it in Umbraco 13 ?

    Any idea?

    I saw in the documentation I can achieve it by editing

      .WithEndpoints(u =>
    

    in Startup.cs

    or something with the Reserved paths

    But not sure.

    Any idea?

    Thanks

  • Bo Jacobsen 602 posts 2400 karma points
    May 10, 2024 @ 06:31
    Bo Jacobsen
    0

    Hi Meni.

    You might be able to achive it by setting the ReservedUrls or ReservedPaths in the appSettings.json.

    "Umbraco": {
      "CMS": {
        "Global": {
          "ReservedUrls": "~/.well-known,~/external-url",
          "ReservedPaths": "~/app_plugins/,~/install/,~/mini-profiler-resources/,~/umbraco/"
         }
       }
    }
    

    Reserved urls

    A comma-seperated list of files to be left alone by Umbraco, these files will be served, and the Umbraco request pipeline will not be triggered.

    Reserved paths

    A comma-separated list of all the folders in your directory to be left alone by Umbraco. If you have folders with custom files, add them to this setting to make sure Umbraco leaves them alone.

    https://docs.umbraco.com/umbraco-cms/reference/configuration/globalsettings

  • Meni 264 posts 500 karma points
    May 14, 2024 @ 04:53
    Meni
    0

    Hi, thanks.

    Didn't work.

    I added both in appsetting.json and appsetting.production.json the follwoing

    "Umbraco": { "CMS": { "Global": { "Id": "**********", "SanitizeTinyMce": true, "ReservedPaths":"~/my-folder/"

    and when navigate to mysite.com/my-folder still getting page not found

    any idea?

    Thanks

  • Bo Jacobsen 602 posts 2400 karma points
    May 14, 2024 @ 07:43
    Bo Jacobsen
    0

    In your case i think you might need to set both the ReservedUrls and ReservedPaths like:

    "Umbraco": {
        "CMS": {
            "Global": {
                "Id": "**********",
                "SanitizeTinyMce": true,
                "ReservedUrls": "~/my-folder",
                "ReservedPaths": "~/my-folder"
            }
        }
    }
    

    Since you host files in the map and wanna be able to navigate to the maps url.

  • Meni 264 posts 500 karma points
    May 15, 2024 @ 17:50
    Meni
    0

    Still not working ...

Please Sign in or register to post replies

Write your reply to:

Draft