Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save OlegShchavelev/4e1d470e292af7c3b3372e72ad3172e8 to your computer and use it in GitHub Desktop.
Save OlegShchavelev/4e1d470e292af7c3b3372e72ad3172e8 to your computer and use it in GitHub Desktop.
index.php
$lowerURI=strtolower($_SERVER['REQUEST_URI']);
if($_SERVER['REQUEST_URI']!=$lowerURI)
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://" . $_SERVER['HTTP_HOST'] . $lowerURI);
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment