'); } // $arUrlRewrite = array(); ///////////////////////////////////////////////// // $arUrlRewrite['_OTHER_']["CONDITION"] = "'^.*/(.*)\.$_CONF_EXT'"; $arUrlRewrite['_OTHER_']["RULE"] = "index.php?key=$1"; // $arUrlRewrite['MAP']["CONDITION"] = "'^.*/$_CONF_PREFIX_MAP(.*)xml'"; $arUrlRewrite['MAP']["RULE"] = "index.php?map=1"; // foreach($arUrlRewrite as $val){ if(preg_match($val["CONDITION"], $_SERVER["REQUEST_URI"])){ if (strlen($val["RULE"]) > 0){ $url = preg_replace($val["CONDITION"], $val["RULE"], $_SERVER["REQUEST_URI"]);} else {$url = "/";} if(($pos=strpos($url, "?"))!==false){ $params = substr($url, $pos+1); parse_str($params, $vars); $_GET += $vars; $_REQUEST += $vars; $GLOBALS += $vars; $_SERVER["QUERY_STRING"] = $QUERY_STRING = $params; $url = substr($url, 0, $pos);} $file = dirname(__FILE__).DIRECTORY_SEPARATOR.$url; if(!file_exists($file) || !is_file($file)){ echo "NOT FILE $file"; continue; } $_SERVER["REAL_FILE_PATH"] = $file; include_once($file); die(); } } ?>