distantnative / retour-for-kirby

Kirby CMS plugin to manage redirects and track 404s right from the Panel
https://distantnative.com/retour-for-kirby/
MIT License
135 stars 15 forks source link

300 url safe panel paths #305

Closed jens-aggergren closed 2 years ago

jens-aggergren commented 2 years ago

Fixes #300

Depending on the settings, the webserver might not always handle escaped forward-slashes in the way, which this plugin expects it to.

This specifically results in a 404 when trying to edit a redirect-entry, unless the AllowEncodedSlashes NoDecode is set for the Apache Server. The problem also occurs in relation to nginx.

Many hosting solutions does not allow customers to change such settings for the web-server, and so another solution is required.

Proposed Changes

Futher remarks

This pull request includes an additional commit, which fixes a unit-test problem. This problem appears to be unrelated to the any to the changes in this pull request. The compiled index.js and index.css have also been commited

basemod commented 2 years ago

This fixes an issue when there is more than one slash (as in "/foo/bar") in the URL that is to be redirected.

bogdancondorachi commented 2 years ago

I can confirm that this solves the issue on my setup as well. Thanks @jens-aggergren

distantnative commented 2 years ago

Thanks a lot 🙏🙏🙏

jens-aggergren commented 2 years ago

Thanks a lot :pray: :pray: :pray:

You're very welcome. And thanks for making this very useful plugin in the first place.