Make rootPath part of regex greedy

- Fixes #10977
bug #10979 Make rootPath part of regex greedy (artursvonda)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10979).

Discussion
----------

Make rootPath part of regex greedy

- Fixes #10977
- Also replaced `isset() && true` with simple `!empty()` which is equivalent.

Commits
-------

31da839 Make rootPath part of regex greedy
[HttpKernel] simplified some tests