Obtenha o URL sem a sequência de consulta php

// get the url before the first occurence of "?"
$url = strtok($_SERVER["REQUEST_URI"], '?');
Lonely Doge