Slim router is not working properly

There is a route:
$app->get('/login', function_login);

It should work when url:

But it works when url:
domain//login and domain///logindomain/////////////////////////login etc

Why? And how to fix it?

please post the closure and the url so we can help yoi

Solution posted here: Why my route don't work?