Closed ieteo closed 2 years ago
🙈
I assume that changing this line:
to:
const path = encodeURIComponent(row.path.replace(/\//g, "\x1D"));
as what was done in: https://github.com/distantnative/retour-for-kirby/blob/b74f5473f33603b7a1bfdaa1c9716b03998202b6/src/panel/components/Tabs/RedirectsTab.vue#L103
would hopefully also fix it in FailuresTab
EDIT:
The above alone won fix the issue.
In order to fix it, I had to changed the above and also change this line:
to:
'from' => str_replace("\x1D",'/', urldecode($path))
✅
Describe the bug
The release 4.2.0 fixed the bug #300 when editing or removing path containing slashes from "Routes". Thank you!
However, the bug is still present when trying to "Add as redirect" from "Failures", which results in 404 error as described in #300
This bug is only present on Apache when the
AllowEncodedSlashes
is set toOff
Steps to reproduce
distantnative/retour-for-kirby
Create
Dockerfile
with following contentBuild image and run the container
Call a non-existent URL containing slashes e.g.
http://localhost/sub/not-existing
Go to http://localhost/panel, create user and log in
Go to
Rredirect
>Failures
andAdd as redirect
the previously called non-existent URLResult:
404 Not Found
from ApacheNote Removing path containing slashes under
Failures
also results in 404 errorExpected behavior
modal opens up in order to add the path as redirect
Context
AllowEncodedSlashes Off