"; $adresse_finale=""; if($_SERVER['REQUEST_URI']=="/energies-renouvelables.html"){$adresse_finale="/fr/qui-sommes-nous.html";} elseif($_SERVER['REQUEST_URI']=="/economies-energie.html"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-photovoltaique/pourquoi-passer-au-solaire-photovoltaique.html";} elseif($_SERVER['REQUEST_URI']=="/etude-personnalisee.php"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-photovoltaique/pourquoi-passer-au-solaire-photovoltaique.html";} elseif($_SERVER['REQUEST_URI']=="/chauffe-eau-solaire-toulouse.php"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-thermique/pourquoi-passer-au-solaire-thermique.html";} elseif($_SERVER['REQUEST_URI']=="/geothermie-aerothermie.html"){$adresse_finale="/fr/nos-solutions/particuliers/geothermie-aerothermie/pourquoi-passer-la-geothermie-l-aerothermie.html";} elseif($_SERVER['REQUEST_URI']=="/recrutement.html"){$adresse_finale="/fr/nous-rejoindre.html";} elseif($_SERVER['REQUEST_URI']=="/panneaux-solaires.html"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-photovoltaique/pourquoi-passer-au-solaire-photovoltaique.html";} elseif($_SERVER['REQUEST_URI']=="/solaire-photovoltaique-toulouse.php"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-photovoltaique/pourquoi-passer-au-solaire-photovoltaique.html";} elseif($_SERVER['REQUEST_URI']=="/panneaux-photovoltaiques.html"){$adresse_finale="/fr/nos-solutions/particuliers/solaire-photovoltaique/pourquoi-passer-au-solaire-photovoltaique.html";} elseif(substr($_SERVER['REQUEST_URI'],0,8)=="/?gclid="){$adresse_finale="/";} if($adresse_finale!=""){ //~ echo 2;exit; header("Status: 301 Moved Permanently", false, 301); header("Location: http://www.prosun.fr".$adresse_finale.""); exit(); } } //redirection des anciennes adresses de falc if($_SERVER['HTTP_HOST']=='ski.francealacarte.com'){ $adresse_finale=""; if(substr($_SERVER['REQUEST_URI'],0,4)=="/re/"){$adresse_finale="/en/";} if($adresse_finale!=""){ header("Status: 301 Moved Permanently", false, 301); header("Location: http://ski.francealacarte.com".$adresse_finale.""); exit(); } } if($_SERVER['HTTP_HOST']=='www.francealacarte.fr'||$_SERVER['HTTP_HOST']=='francealacarte.fr'||$_SERVER['HTTP_HOST']=='francealacarte.com'){ header("Status: 301 Moved Permanently", false, 301); header("Location: http://www.francealacarte.com"); exit(); } if($_SERVER['HTTP_HOST']=='www.francealacarteski.com'){ header("Status: 301 Moved Permanently", false, 301); header("Location: http://ski.francealacarte.com".$_SERVER['REQUEST_URI']); exit(); } if($_SERVER['HTTP_HOST']=='www.incoming-travel-organizer.com'||$_SERVER['HTTP_HOST']=='incoming-travel-organizer.com'){ header("Status: 301 Moved Permanently", false, 301); header("Location: http://www.francealacarte.com".$_SERVER['REQUEST_URI']); exit(); } if($_SERVER['HTTP_HOST']=='francealacarte.com'||$_SERVER['HTTP_HOST']=='www.francealacarte.com'){ //~ echo ""; $adresse_finale=""; if(substr($_SERVER['REQUEST_URI'],0,4)=="/re/"){$adresse_finale="/en/";} if(substr($_SERVER['REQUEST_URI'],0,8)=="/french/"){$adresse_finale="/fr/";} if($_SERVER['REQUEST_URI']=="/re/french_cuisine.htm"){$adresse_finale="/en/cours-de-cuisine.html";} if($_SERVER['REQUEST_URI']=="/re/french_cuisine.html/"){$adresse_finale="/fr/cours-de-cuisine.html";} if($_SERVER['REQUEST_URI']=="/fr/COURS-DE-CUISINE.html/french/"){$adresse_finale="/fr/cours-de-cuisine.html";} if($_SERVER['REQUEST_URI']=="/fr/COURS-DE-CUISINE.html/recipes.htm"){$adresse_finale="/fr/cours-de-cuisine.html";} if($_SERVER['REQUEST_URI']=="/fr/COURS-DE-CUISINE.html/french/index.htm"){$adresse_finale="/fr/cours-de-cuisine.html";} elseif($_SERVER['REQUEST_URI']=="/re/escorted_tours.htm"){$adresse_finale="/en/ESCORTED-TOUR.html";} elseif($_SERVER['REQUEST_URI']=="/re/group_tours.htm"){$adresse_finale="/en/GROUP-TRAVEL.html";} elseif($_SERVER['REQUEST_URI']=="/re/sport.htm"){$adresse_finale="/en/SPORTING-BREAKS.html";} elseif($_SERVER['REQUEST_URI']=="/re/spa_golf_thalasso.htm"){$adresse_finale="/en/golf-aquitaine-gascogne.html";} elseif($_SERVER['REQUEST_URI']=="/re/frenchwine.htm"){$adresse_finale="/en/private-wine-tours.html";} elseif($_SERVER['REQUEST_URI']=="/re/frenchwine.html/"){$adresse_finale="/en/private-wine-tours.html";} elseif($_SERVER['REQUEST_URI']=="/re/products.html"){$adresse_finale="/en/Bienvenue.html";} elseif($_SERVER['REQUEST_URI']=="/re/french/"){$adresse_finale="/fr/";} elseif($_SERVER['REQUEST_URI']=="/re/french/index.htm"){$adresse_finale="/fr/";} elseif($_SERVER['REQUEST_URI']=="/re/"){$adresse_finale="/en/";} elseif($_SERVER['REQUEST_URI']=="/en/cooking-classes.html/"){$adresse_finale="/en/cooking-classes.html";} elseif($_SERVER['REQUEST_URI']=="/re/cooking-classes.html/"){$adresse_finale="/en/cooking-classes.html";} elseif($_SERVER['REQUEST_URI']=="/re/cooking-classes.html"){$adresse_finale="/en/cooking-classes.html";} if($adresse_finale!=""){ //~ echo 2;exit; header("Status: 301 Moved Permanently", false, 301); header("Location: http://www.francealacarte.com".$adresse_finale.""); exit(); } } if($_SERVER['HTTP_HOST']=='www.camping-pradelongue.fr' && $_COOKIE['autorisation_bws']!=1){ include("gabarits/gabarit_pradelongue/index.html"); exit(); } //~ if($_SERVER['HTTP_HOST']=='www.agenceozmoz.fr' && $_COOKIE['autorisation_bws']!=1){ //~ include("gabarits/gabarit_ozmoz/index.html"); //~ exit(); //~ } //~ ////////////////////////////////////////// //~ //suppression des doublons de langues //~ if(strpos("/fr/fr/",$_SERVER['REQUEST_URI'])){ //~ while(strpos("/fr/fr/",$_SERVER['REQUEST_URI'])){ //~ $_SERVER['REQUEST_URI']=str_replace("/fr/fr/","/fr/",$_SERVER['REQUEST_URI']); //~ } //~ header("Status: 301 Moved Permanently", false, 301); //~ header("Location: ".DIR_ROOT.$_SERVER['REQUEST_URI']); //~ exit(); //~ } //~ echo "a"; include('includes/php/config.inc.php'); // include ('/var/www/bugbusters/web/includes/php/config.inc.php'); // print_r($_SERVER); //~ echo "n";exit; $_SERVER['REQUEST_URI']=str_replace($infos_sous_domaine[1]."/","",$_SERVER['REQUEST_URI']); // if($info_local['id_site']==2){ // echo ""; // } // REDIRECTION DES ANCIENNES ADRESSES if($_SERVER['HTTP_HOST']=='francealacarte.com'||$_SERVER['HTTP_HOST']=='www.francealacarte.com'||$_SERVER['HTTP_HOST']=='ski.francealacarte.com'){ $sql_historique_ref="SELECT * FROM redirection_ref WHERE ancienne_url='".$_SERVER['REQUEST_URI']."'"; $rs_historique_ref=mysql_query($sql_historique_ref); if(mysql_num_rows($rs_historique_ref)!=0){ $result_historique_ref=mysql_fetch_array($rs_historique_ref); if($result_historique_ref['url']!='') { header("Status: 301 Moved Permanently", false, 301); header("Location: ".DIR_ROOT.$_SESSION['sess_idioma']."/".$result_historique_ref['url']); exit(); } } } //~ echo "a";exit; if(substr($_SERVER['REQUEST_URI'],0,16)=="/index.php?page="){ //~ echo "a";exit; // print_r($_SERVER);echo "

";print_r($_GET);exit; //VERIFICATION DE L HISTORIQUE DES REDIRECTIONS $sql_historique="SELECT * FROM URL_historique WHERE ancienne_url='".$_GET['page']."' AND langue='".$_SESSION['sess_idioma']."'"; //~ echo ""; $rs_historique=mysql_query($sql_historique); // echo $sql_historique;exit; if(mysql_num_rows($rs_historique)!=0){ $result_historique=mysql_fetch_array($rs_historique); $_GET['page']=$result_historique['nouvelle_url']; } // REDIRECTION 301 VERS LA NOUVELLE PAGE DANS LA BONNE ZONE $query_url=mysql_query("SELECT * FROM URL WHERE nom_".$_SESSION['sess_idioma']."='".$_GET['page']."'"); if(mysql_num_rows($query_url)!=0){ $info_url=mysql_fetch_array($query_url); $fin="?"; $parametres_get=explode("&",$_SERVER['QUERY_STRING']); $tab_param=array(); foreach($parametres_get as $k => $v){ $param=explode("=",$v); if($param[0]!="page"){$fin.=$param[0]."=".$param[1]."&";} } if($fin=="?"){$fin="";} header("Status: 301 Moved Permanently", false, 301); header("Location: ".DIR_ROOT.$_SESSION['sess_idioma']."/".$info_url['nom_'.$_SESSION['sess_idioma']].".html".$fin); exit(); } else{include(DIR_FS_ROOT."erreur_404.php");} } //~ echo "b";exit; if(!empty($_POST)) foreach($_POST as $k => $v){if(!is_array($v)){$_POST[$k]=strip_tags($v);}} if(!empty($_GET)) foreach($_GET as $k => $v){$_GET[$k]=strip_tags($v);} if(!isset($_GET['page'])){ //~ echo "c";exit; //~ echo "page vide";exit; //~ print_r($_SERVER); if(empty($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI']=="/" ){ //~ echo $_SERVER['REQUEST_URI']; include(DIR_FS_ROOT."index2.php");} else{include(DIR_FS_ROOT."erreur_404.php");} // include('index2.php'); } else{ //~ echo "d";exit; // $_GET['page']=urlencode($_GET['page']); //~ echo "SELECT url FROM URL WHERE nom='".urlencode($_GET['page'])."'"; //~ exit(); $sql="SELECT url FROM URL WHERE nom_".$_SESSION['sess_idioma']."='".$_GET['page']."'"; // mail("c.bonici@bugbusters.fr","test bios",$sql); //~ if($info_local['code_site']=="bios-analytique"){ //~ echo $sql; //~ exit; //~ } $rs=mysql_query($sql); if(mysql_num_rows($rs)==0){ //~ echo "a";exit; $sql_historique="SELECT * FROM URL_historique WHERE ancienne_url='".$_GET['page']."' AND langue='".$_SESSION['sess_idioma']."'"; $rs_historique=mysql_query($sql_historique); if(mysql_num_rows($rs_historique)==0){ if(empty($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI']=="/" ){include(DIR_FS_ROOT."index2.php");} else{ if($info_local['id_master']!=0){ mysql_close(); conectar_bd_master(); $sql2="SELECT url FROM URL WHERE (type=2 OR type=8) AND nom_".$_SESSION['sess_idioma']."='".str_replace('.html','',$_GET['page'])."'"; $rs2=mysql_query($sql2); if(mysql_num_rows($rs2)==0){ mysql_close(); conectar_bd(); include(DIR_FS_ROOT."erreur_404.php"); } else{ $result_page2=mysql_fetch_array($rs2); mysql_close(); conectar_bd(); include(include_gabarit(DIR_FS_ROOT.$result_page2['url'])); } } else{include(DIR_FS_ROOT."erreur_404.php");} } } else{ $result_historique=mysql_fetch_array($rs_historique); // print_r($result_historique);exit; $sql_url2="SELECT * FROM URL WHERE nom_".$_SESSION['sess_idioma']."='".$result_historique['nouvelle_url']."'"; $rs_url2=mysql_query($sql_url2); $result_url2=mysql_fetch_array($rs_url2); //~ print_r($result_url2);exit; header("Status: 301 Moved Permanently", false, 301); header("Location: ".DIR_ROOT.$_SESSION['sess_idioma']."/".$result_url2['nom_'.$_SESSION['sess_idioma']].".html"); exit(); } } else{ $result_page=mysql_fetch_array($rs); //~ if($info_local['id_site']=="bdss"){ //~ print_r($result_page);exit; //~ } //~ echo "test bugbusters".$result_page['url'];exit; // if($info_local['code_site']=='mbm'){ //Redirection des pages sans le .html vers la page avec le .html $titre_url=str_replace("?".$_SERVER['QUERY_STRING'],'',$_SERVER['REQUEST_URI']); if(!empty($_SERVER['QUERY_STRING'])){$aj_param="?".$_SERVER['QUERY_STRING'];} if(substr($titre_url,-5)!=".html" && substr($_SERVER['REQUEST_URI'],-1)!='/'){ header("Status: 301 Moved Permanently", false, 301); header("Location: ".DIR_ROOT.$_SESSION['sess_idioma'].$titre_url.".html".$aj_param); exit(); } // } include(include_gabarit(DIR_FS_ROOT.$result_page['url'])); } } ?>