Updated replacement logic to be strict, just in case there is a scenario where the string could be replaced more than once.

This commit is contained in:
Josh Sherman 2010-12-17 22:30:55 -05:00
parent e008ffcf2b
commit 25e78fc569

View file

@ -55,7 +55,7 @@ class Controller extends Object
$lowercase_reqest = strtolower($_REQUEST['request']);
if ($_REQUEST['request'] != $lowercase_reqest)
{
header('Location: ' . str_replace('/' . $_REQUEST['request'], '/' . $lowercase_reqest, $_SERVER['REQUEST_URI']));
header('Location: ' . substr_replace($_SERVER['REQUEST_URI'], $lowercase_reqest, 1, strlen($lowercase_reqest)));
exit;
}