Получите URL без строки запроса php php
// get the url before the first occurence of "?"
$url = strtok($_SERVER["REQUEST_URI"], '?');
Lonely Doge
// get the url before the first occurence of "?"
$url = strtok($_SERVER["REQUEST_URI"], '?');