router icon indicating copy to clipboard operation
router copied to clipboard

dont return /

Open pehser opened this issue 8 years ago • 1 comments

And how to get with slash?

$router->get('/catalog/(.*)', function ($hurl){ return $hurl; })

/catalog/televizoryi/ return televizoryi

/catalog/televizoryi return televizoryi

:(

pehser avatar Nov 20 '18 08:11 pehser

One of the design decisions in bramus/router is to have routes respond to both the with-trailing-slash and without-trailing-slash variants.

Afters years of not doing so, I'm glad to see that Symfony has also adopted this behavior by now (they don't serve the same content though, they do a redirect).

bramus avatar Nov 20 '18 09:11 bramus