Was actually the opposite that was needed; I changed the code _calling_ getpid to fallback and check the old URL (hard-coded) after trying the reversed URL.