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

Tips & Tricks
How to use Cloudflare Workers and Transform Rul...

This post explains how to m...

News
UmbHost Limited is now a Silver Umbraco Partner

We are now officially a Sil...

Umbraco
How to pass a Content Security Nonce (CSP) to G...

How to use a CSP nonce with...

News
UmbCheckout 1.0.0 & UmbCheckout.StarterKit.Stri...

The stable version of UmbCh...

News
Voting is now open for the Green Business of th...

We've been shortlisted! - P...

ADVERTISTING
Browse Umbraco Hosting

Umbraco Hosting Starting At $26/month