Redirect to Slash plugin

I just copy paste the readme-file in here…

Redirect to Slash

In Kirby CMS it redirects every page to urls with slashes.

Why you need it

Maybe you already know but here are some cases:

  • You migrate to Kirby from WordPress and want to keep the url structure.
  • You migrate to Kirby from anoter CMS and want to keep the url structure.
  • You simply like it better.

How it works

  1. It will ignore the urls for the Panel and the Patterns plugin.
  2. It will take the last part of the url and check if it has valid characters.
  3. Allowed characters are a-z, 0-9 and slash.
  4. If it only have allowed characters it will redirect to slash, else it don’t.
  5. If it includes other characters like ? or : it will not be redirected.


Example 1

Will redirect:

Example 2

Will not redirect because of characters that are not allowed:


If you have the panel or the patterns plugin in a different location you can change it here. Below are the defaults.

c::set('', 'panel');
c::set('', 'patterns');

Known issues

  • It does not check if it’s a page before the redirect. WordPress has the same issue.