//include("../_inc/all.php");
$debug=0;
if ($debug) echo "Rewriter started...
";
if ($debug) echo "GETs: ".nl2br(print_r($_GET,true))."
";
$qs=strtolower($_SERVER['QUERY_STRING']);
$qs2=explode("&",$qs,2);
if (count($qs2)>1) $qs=$qs2[0];
if ($debug) echo "Query1: ".$qs."
";
// Google URL Decodieren
$qs2 = utf8_decode($qs);
if(strpos(urlencode($qs),"%C3%")!==false)
$qs = $qs2;
$orgqs = $qs;
if ($debug) echo "Querya: ".$qs."
";
if (substr($qs,-5)==".html") $qs=substr($qs,0,-5);
if (substr($qs,-4)==".htm") $qs=substr($qs,0,-4);
//-------
if ($debug) echo "Queryb: ".$qs."
";
$strippedqs=str_replace("_","",str_replace("-","",$qs));
//WEiter gehts ;)
$qs.="/";
$p=explode("/",$qs);
array_shift($p);
if (count($p)>1)
$modul=array_shift($p);
/*if (count($p)>1)
$file=array_shift($p);*/
if (count($p)>1)
$destpage=array_shift($p);
if (count($p)>1)
$step=array_shift($p);
if (count($p)>1)
$id=array_shift($p);
//if(!$modul) $modul = "home";
//if(!$file) $file = "index"; // jetzt in der index.php
$lang="de";
//Sitemap
if($modul=="sitemap.xml"){
readfile("sitemap.xml");
exit;
}
//Robots
if($modul=="robots.txt"){
readfile("robots.txt");
exit;
}
// NEWS RSS
if($modul=="rss.xml"){
include('rss_feed.php');
exit;
}
if ($debug) echo "Modul: $modul
";
//if ($debug) echo "file: $file
";
if ($debug) echo "destpage: $destpage
";
if ($debug) echo "step: $step
";
if ($debug) echo "id: $id
";
//
include("index.php");
//if ($debug) echo "Rewriter done...
";
?>