Code: Alles auswählen
<?PHP
//Automatische Sprachauswahl
if ($_GET["site"]==''){
if($sprachauswahl=="de") { ?>
<meta http-equiv="refresh" content="0; URL=home.html">
<?PHP
}
else if(($sprachauswahl=="de-de")||($sprachauswahl=="de-DE")) { ?>
<meta http-equiv="refresh" content="0; URL=home.html" />
<?PHP
}
else if(($sprachauswahl=="de-at")||($sprachauswahl=="de-AT")) { ?>
<meta http-equiv="refresh" content="0; URL=home.html" />
<?PHP
}
else if($sprachauswahl=="fr") { ?>
<meta http-equiv="refresh" content="0; URL=fr_home.html" />
<?PHP
}
.
.
.
else{ ?>
<meta http-equiv="refresh" content="0; URL=en_home.html" />
<?PHP
} }
?>
Funktioniert das so:
Code: Alles auswählen
<?PHP
//Automatische Sprachauswahl
if ($_GET["site"]==''){
if($sprachauswahl=="de") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.de/home.html");
}
else if(($sprachauswahl=="de-de")||($sprachauswahl=="de-DE")) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.de/home.html");
}
else if($sprachauswahl=="fr") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.de/fr_home.html");
}
.
.
.
else{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.de/en_home.html");
} }
?>
Habe irgendwie Bedenken ein 301 in eine if zu packen. Checkt das die Suchmaschine?