# \[Solved\] Arguments not working properly in built-in server

**URL:** <https://discourse.slimframework.com/t/solved-arguments-not-working-properly-in-built-in-server/320>\
**Category:** Questions\
**Created:** [May 24, 2016, 8:18pm UTC](https://discourse.slimframework.com/t/solved-arguments-not-working-properly-in-built-in-server/320 "2016-05-24T20:18:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustavonovaes93](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/gustavonovaes93/32/113_2.png) [@gustavonovaes93](https://discourse.slimframework.com/u/gustavonovaes93)\
**Post date:** [May 24, 2016, 8:18pm UTC](https://discourse.slimframework.com/t/solved-arguments-not-working-properly-in-built-in-server/320/1 "2016-05-24T20:18:24Z")

</div>

PHP 5.6.12  
Slim 3.1.0

Running the command:

> php -S localhost:8000 test.php

With this code:

```
// test.php

require 'vendor/autoload.php';

$app = new \Slim\App;
$app->get('/{name}', function ($request, $response) {
    $name = $request->getAttribute('name');
    $response->getBody()->write("Hello, $name");
    return $response;
});
$app->run();

```

When I try GET “ **localhost:8000/foo** ” returns “Page not found”

But when i try: “ **localhost:8000/foo%20bar\_after\_space** ” returns correctly: “Hello, foo bar\_after\_space”.

Anyone know how to solve this?  
Thanks

**SOLUTION:**

**If i rename the file to “index.php”, run the code below and works… 😐**

> php -S localhost:8000 -t .

---

<div class="post-metadata">

**Author:** ![llvdl](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/llvdl/32/78_2.png) [@llvdl](https://discourse.slimframework.com/u/llvdl)\
**Post date:** [May 25, 2016, 10:49am UTC](https://discourse.slimframework.com/t/solved-arguments-not-working-properly-in-built-in-server/320/2 "2016-05-25T10:49:24Z")

</div>

The built-in webserver has [some rules](http://php.net/manual/en/features.commandline.webserver.php):

> If an index.php or index.html is found, it is returned and $\_SERVER[‘PATH\_INFO’] is set to the trailing part of the URI. Otherwise a 404 response code is returned.
