Force lowercase on URLs - Kentico MVC

Gustavo Quevedo asked on October 31, 2019 19:22

Hi,

Has anyone implemented a way to force lowercase of URLs on Kentico MVC and got it working?

I've tried setting this option in the CMS:

Settings / Content / URLs and SEO / SEO - URLs / Redirect invalid case URLs to their correct versions / Redirect all requests to lower case URLs

but it doesn't seem to do anything.

I've also tried this method: https://stackoverflow.com/questions/878578/how-can-i-have-lowercase-routes-in-asp-net-mvc

The first part routes.LowercaseUrls = true; doesn't seem to change anything either.

Handling the Application_BeginRequest event seemed to bring other issues, or at least the way I implemented it.

Any help would be appreciated.

Kind regards,

Gustavo

Recent Answers


Roman Hutnyk answered on October 31, 2019 19:45

Have you considered configuring URL rewrite rule in web.config or IIS?

0 votesVote for this answer Mark as a Correct answer

Zach Perry answered on November 4, 2019 16:14

I reached out to support about this at one point. Forcing lowercase URLs via routes.LowercaseUrls will break page builder because those URLs are case sensitive. They told me you can try doing it that way and exclude urls that have cmsctx in the path. I gave up on the lowercase URLs before validating if this works.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.