Kirby Redirect 301
Redirect internal uris to other internal uris with status 301.
- See usage how to add redirects.
It works like key value pairs, from one uri to another uri:
c::set('plugin.redirect301', [ 'my/old/uri' => 'my/new/cool/uri/', 'another/one/' => 'another/new' ]);
- As you can see you can have an ending
/in the uri if you want.
- The uri does not need to be existing pages.
- It does not work with full urls in this version, just uris.
Why not use htaccess?
If you feel like using htaccess for it I will not stop you but I use it because of this:
- Kirby core sometimes change the htaccess. I like to keep it clean from custom stuff.
- With PHP it’s possible to add logic to the rules.