Special characters in URL

I have a rout that looks basically like:
app->get(’/login/{email}/{password}’, function (Request $request, Response $response, $args) {…});

What’s interesting is that if I try to access it as:

I start it up with php -S localhost:4201 -t pwd

If I try to access this with the url

http://localhost:4201/login/foo/bar then my function runs.

if I try to access this with the url:

http://localhost:4201/login/foo.baz/bar then I get a 404 error Note the period in “foo.baz”

Anyone know why this is and how I can get around it without using a full apache backend (this is running on Ubuntu, by the way)

Hi @kevin,

This is a limitation of PHP’s built in server. It has been marked as a bug with PHP (Bug #61286) however it has been marked as Won't fix.

You can see additional information on this Slim issue: routes with dot don’t work when using PHP 5.4 embedded webserver

There is some commentary there regarding workarounds.

Thank you, I’ll follow that. Stupid me, I didn’t even think to look over in the PHP forums