Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vivirenremoto/e5cd38ba7deac14b8deb9bcf188b8d0e to your computer and use it in GitHub Desktop.
Save vivirenremoto/e5cd38ba7deac14b8deb9bcf188b8d0e to your computer and use it in GitHub Desktop.
redirect 301 delete parameters
if (isset($_GET['controller']) && $_GET['controller'] == 404) {
$t_url = explode('?', $_SERVER['REQUEST_URI']);
$redirect = current($t_url);
header('Location: ' . $redirect, true, 301);
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment