diff --git a/index.php b/index.php index ee449a3c..ffbf4122 100644 --- a/index.php +++ b/index.php @@ -51,8 +51,9 @@ if(preg_match("/^[A-Za-z0-9-_%\'+]+\.png$/i", $uri)) { include TOOLS . 'signature/index.php'; exit(); } -else if(preg_match("/^(.*)\.(gif|jpg|png|jpeg|tiff|bmp|css|js|less|map|html|php|zip|rar|gz|ttf|woff|ico)$/i", $_SERVER['REQUEST_URI'])) { - header("HTTP/1.0 404 Not Found"); + +if(preg_match("/^(.*)\.(gif|jpg|png|jpeg|tiff|bmp|css|js|less|map|html|php|zip|rar|gz|ttf|woff|ico)$/i", $_SERVER['REQUEST_URI'])) { + header('HTTP/1.0 404 Not Found'); exit; } @@ -126,6 +127,7 @@ else { foreach($rules as $rule => $redirect) { if (preg_match($rule, $uri)) { $tmp = explode('/', $uri); + /* @var $redirect array */ foreach($redirect as $key => $value) { if(strpos($value, '$') !== false) {