Routing problem in Multilang Setup

I have a multilang Kirby Setup and when i enter a wrong url i’ll get routed to the homepage instead of the 404 Error page.

when i enter for example:
https://example.domain/en/use-cases
everything works as expected, all my pages get routed correct. when i remove the /en but keep the // like here:
https://example.domain//use-cases
should get redirected to the 404 page but displays the homepage instead
when in add another slash like here
https://example.domain///use-cases
it get’s even more worse and instead a 404 Page i get a PHP error.
grafik

can someone reproduce this or got a solution for it?

Which Kirby version are you using?

ahh sorry, i’m using Kirby v3.7.5 on PHP 8.1 and NGINX

Never tried this before, but I can replicate the double-slash redirect to home on a single-language setup on 3.8.1 (local test env on Nginx, production on Apache; both PHP 8.0), so this might not even be related to multilang.

…just for fun also tried here: https://getkirby.com//try :grin:

This one I am not able to replicate on any of my sites I tried with – neither single nor multi language …and not on getkirby.com either :wink:

Locks like different systems handle this differently. I tried CSS-Tricks and Smashing-Magazine, and none of those redirect to the error page in these cases, but rather stay on the page/redirect to the same page.