Me respondo a mí mismo.

Solucionado:

Código:
$urlactual = $_SERVER["REQUEST_URI"];