100){ header("HTTP/1.1 404 Not Found"); exit(); } */ # CHECA SE EXISTE DIRETORIO COM INDEX DENTRO //Código retirado do A List Apart $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; $REQUEST_URI = $_SERVER['REQUEST_URI']; $SCRIPT_FILENAME = $_SERVER['SCRIPT_FILENAME']; //echo $DOCUMENT_ROOT.$REQUEST_URI."
"; //echo $DOCUMENT_ROOT."
"; //echo $REQUEST_URI."
"; //echo $SCRIPT_FILENAME."

"; if(file_exists($DOCUMENT_ROOT.$REQUEST_URI) and ($SCRIPT_FILENAME!=$DOCUMENT_ROOT.$REQUEST_URI) and ($REQUEST_URI!="/")){ //echo $DOCUMENT_ROOT.$REQUEST_URI.'index.php'; if(is_file($DOCUMENT_ROOT.$REQUEST_URI.'index.php')) { require_once($DOCUMENT_ROOT.$REQUEST_URI.'index.php'); exit(); } } ############################################### $url = strip_tags($REQUEST_URI); $url_array = explode("/",$url); array_shift($url_array); //o primeiro índice sempre será vazio /* if(empty($url_array)){ include("site_index.php"); exit(); } */ # INCLUI SE O PRIMEIRO PARAMETRO FOR UM ARQUIVO //echo $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']; if($url_array[$index] == 'index.html'){ require_once('index.html'); exit(); } elseif( @is_file("".$url_array[$index].".html") ) { require_once("".$url_array[$index].".html"); exit; } elseif( @is_file("".$url_array[$index]) ) { require_once("".$url_array[$index]); exit; } else if(@is_file($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'])) { $mime = get_mime($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']); header("Content-type: ".$mime.""); //require_once($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']); print file_get_contents($_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']); exit; }elseif(@is_file("_".$url_array[$index].".php")) { require_once("_".$url_array[$index].".php"); //require_once("_".$url_array[$index].".php"); exit; }/*else if(@is_file($url_array[$index].".php")) { echo 'ok'; require_once($url_array[$index].".php"); exit; # SE ESTIVER SETADO O PARAMETRO 1 E NAO O 2 , SIGNIFICA UMA BUSCA }*/ elseif(@is_file("_".substr($url_array[$index],0,strlen($url_array[$index])-5).".php")) { require_once("_".substr($url_array[$index],0,strlen($url_array[$index])-5).".php"); //require_once("_".$url_array[$index].".php"); exit; } elseif( @$url_array[$index] == 'artigo' ) { require_once("noticia.php"); exit; # SE ESTIVER SETADO O PARAMETRO 1 E NAO O 2 , SIGNIFICA UMA BUSCA } elseif( @$url_array[$index] && !@$url_array[$index+2] ) { /** * 0 - Busca * 1 - Descricao * 2 - ID * * */ //echo "BUSCA"; //require_once("busca.php"); require_once("index.html"); exit; /* # SE ESTIVER SETADO O PARAMETRO 1 E O 2 , SIGINIFICA UM IMOVEL } elseif( @$url_array[$index] && @$url_array[$index+1] && @$url_array[$index+2] ) { // imovel require_once("index.php"); exit; */ } else { require_once("index.html"); //header('Location: trafego/ '); exit; } /* print "
";
	print_r($url_array);
	print "
"; */ header("HTTP/1.1 404 Not Found"); exit(); }else{ include("hotsitebellafashion.html"); }