-1

How do I remove trailing slashes in a URL.

For example: I want this url https://test.com/mypage/ to redirected to https://test.com/mypage

The fix should not affect the admin site. Fix is only needed for the public site.

We are using Kentico 12 MVC version

chamara
  • 12,649
  • 32
  • 134
  • 210

2 Answers2

0

For performance reasons I would do this on the IIS level using URL rewriting rule you can find on Google or here on SO there are many threads on this topic how to do it in MVC routing. E.g. Remove Trailing Slash From the URL

jurajo
  • 937
  • 5
  • 5
0

12 kind of sucked for options... 13 has a settings to adjust the URL including trailing slash or not. For 12 though you usually had to manually do routing, or use the pattern on the page type, so indeed it may be just an issue with your MVC setup instead of kentico.

Trevor F
  • 1,429
  • 9
  • 6