Correctly remove routing url from query string.

It completes @lorenzo's [original fix](https://github.com/cakephp/cakephp/commit/f94394f582e4a2c83e4376f6b4c643b8dc041438)

It mostly happens when in nxing setups, because of location defined like:

```
location / {
  try_files $uri $uri/ /app/webroot/index.php?$uri&$args;
}
```

In my particular case, I have a custom location with ```CakeRequest->base``` defined as ```/3``` for example.
```
location / {
  try_files $uri $uri/ /$api_app_version/app/webroot/index.php?$uri&$args;
}
```