Hi. Good eye! Yes, I see the problem when a link like http://sub.domain.com is encountered without an ending slash. Untested, but an alternative solution might be the following:
PHP Code:
if (($regs[5] != "") && ($regs[8] == "")) {
$links[$index] = array("path" => "", "file" => "");
}
elsif (substr($regs[8],0,1) == "/") {
$links[$index] = phpdigRewriteUrl($regs[8]);
}
else {
$links[$index] = phpdigRewriteUrl($path.$regs[8]);
}