http://it.php.net/manual/en/reserved...les.server.php

'REQUEST_URI' dovrebbe fare al caso tuo