Forse ho trovato: che ne dite, potrebbe funzionare un

getenv("PATH_INFO");

per quello che devo fare secondo voi?
Grazie!