Merge branch 'hotfix/3828'

Close #3828
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' into develop

Forward port #3839