How to remove trailing slash in Umbraco 9 (RC)

Building on my previous post How to remove trailing slash in Umbraco 8, removing the traling slash in Umbraco 9 (RC) is just as easy.

I still think the trailing slash is messy, and urls are much nicer without it, also much more user friendly, and Google states the trailing slash doesn't affect SEO at all.

The setting now lives in the appsettings.json file within the Umbraco -> CMS properties.

After RuntimeMinification add a comma (,) and then paste in the below boolean property:

"RequestHandler": {
        "AddTrailingSlash": false
      }

Below you will find an example of my upcoming project in V9

"Umbraco": {
    "CMS": {
      "ModelsBuilder": {
        "ModelsMode": "SourceCodeManual",
        "AcceptUnsafeModelsDirectory": true,
        "ModelsNamespace": "SecretNewProject.Shared.Models.PublishedModels",
        "ModelsDirectory": "~/../SecretNewProject.Shared/Models/PublishedModels"
      },
      "Global": {
        "DefaultUILanguage": "en-GB",
        "VersionCheckPeriod": 0,
        "Smtp": {
          "From": "[email protected]",
          "Host": "localhost",
          "Port": 25
        }
      },
      "Hosting": {
        "Debug": true
      },
      "RuntimeMinification": {
        "useInMemoryCache": true,
        "cacheBuster": "Timestamp"
      },
      "RequestHandler": {
        "AddTrailingSlash": false
      }
    }
  }

That's all there is to it!

Comments (0)
Leave a Comment

Your comment

Contact Info
Comment