Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.volley92.asso.fr
/
htdocs
/
config
/
/srv/data/web/vhosts/www.volley92.asso.fr/htdocs/config/router.php
<?php $slug = str_replace(str_replace('index.php', '', $_SERVER['SCRIPT_NAME']),'',$_SERVER['REQUEST_URI']); $base = 'https://'. $_SERVER['HTTP_HOST'] . str_replace('index.php', '', $_SERVER['SCRIPT_NAME']); //echo $_SERVER['HTTP_HOST']." ==> ".$slug." | base = ".$base;die; include "routes.php"; if(strpos($slug,'/?')!==false){ $slug = strstr($slug, '/?', true); }elseif(strpos($slug,'?')!==false){ $slug = strstr($slug, '?', true); } $current_route = array_search($slug,$routes); //echo $slug;die; if(!$current_route){ if (empty($slug)){//Home page est vide mais le routeur contient la baseref $current_route = "home"; }elseif (strpos($slug,$routes['news-single'].'-')!==false){//Pagination actualités $current_route = "news-single"; }elseif (strpos($slug,$routes['page-single'].'-')!==false){//Pagination actualités $current_route = "page-single"; }elseif (strpos($slug,$routes['sportif'].'-')!==false){//Pagination actualités $current_route = "sportif"; }elseif (strpos($slug,$routes['formations'].'-')!==false){//Pagination actualités $current_route = "formations"; }elseif (strpos($slug,$routes['formation'].'-')!==false){//Pagination actualités $current_route = "formation"; }elseif (strpos($slug,$routes['inscription'].'-')!==false){//Pagination actualités $current_route = "inscription"; }elseif (strpos($slug,$routes['clubs'].'-')!==false){//Pagination actualités $current_route = "clubs"; }elseif (strpos($slug,$routes['club'].'-')!==false){//Pagination actualités $current_route = "club"; // }elseif (strpos($slug,$routes['beach-volley'].'-')!==false){//Pagination actualités // $current_route = "beach-volley"; }elseif (strpos($slug,$routes['news'].'-')!==false){//Pagination actualités $current_route = "actualites"; }elseif (strpos($slug,$routes['album'].'-')!==false){//Actualité simple $current_route = "album"; }elseif (strpos($slug,$routes['product'].'-')!==false){//Produit simple $current_route = "product"; }else{ http_response_code(404);//Change le code de la page $current_route = 404;//Charge la page 404 } } $page = "pages/".$current_route.".php"; $conf_title=$metas[$current_route][0]; $conf_description=$metas[$current_route][1]; $conf_keywords=$metas[$current_route][2];