Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Убираем страницы с адресом с учетом GET параметров
//удалаем GET
$url = explode('?', $_SERVER['REQUEST_URI']);
//получаем ссылку без GET
$url = $url[0];
//преобразовываем в массив
$pieces = explode("/", $url);
$new_array = array_diff($pieces, array(''));
//проверяем соответствие кода элемента и последнего элемента массива
LocalRedirect("/404.php", "404 Not Found");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.