con questa variabile puoi prendere l'indirizzo che hai richiamato:

$_SERVER['REQUEST_URI']