Implemented optional subdomains with regex
Fix PHPDoc
Has child doesn't make sense for Hostname route
Matched length is not needed for Hostname route
Merge branch 'hotfix/3839'

Close #3839
Close #3825
Fixes #2477