Category

Umbraco

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
Andrew Thompson

Posted: 15th August 2022

Useful. Thanks!

Post a comment

Fields marked with an * (asterisk) are required


Recent Posts

News
.NET 9 Now Available

DotNet 9 Has been rolled ou...

News
Black Friday 2024 - FREE Umbraco Forms licence!

How to claim your FREE Umbr...

Umbraco
How to deploy Umbraco using Web Deploy from Azu...

How to deploy Umbraco using...

Umbraco
How to deploy Umbraco using Web Deploy from Git...

This blog post shows how yo...

Umbraco
Umbraco Medium Security Vulnerabilities - 22nd...

Security patches now availa...

ADVERTISTING
(Umbraco Hosting)

Umbraco Hosting Starting At €23/month