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:
parent
e008ffcf2b
commit
25e78fc569
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue