Examples
Request URL: https://sub-domain.domain.tld/sub/folder/folder_parser.php
Output 1:
$newPaths [ "sub-domain.domain.tld/", "sub-domain.domain.tld/sub", "sub-domain.domain.tld/folder" ];
in other way just on main domain;
Request URL: https://domain.tld/sub/folder/folder_parser.php
Output 2:
$newPaths [ "domain.tld/", "domain.tld/sub", "domain.tld/folder" ];
or included www field
Request URL: https://www.domain.tld/sub/folder/folder_parser.php
Output 3:
$newPaths [ "www.domain.tld/", "www.domain.tld/sub", "www.domain.tld/folder" ];
and there are other possibilities