Hallo,
lege im Wordpress Hauptverzeichnis eine redirect.php mit folgenden Inhalt an:
<?php
// Initialize the language code variable
$lc = "";
// Check to see that the global language server variable isset()
// If it is set, we cut the first two characters from that string
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
$lc = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
// Now we simply evaluate that variable to detect specific languages
if($lc == "en"){
header("location: /en/");
exit();
} else if($lc == "de"){
header("location: /de/");
exit();
}
else{ // don't forget the default case if $lc is empty
header("location: /en/");
exit();
}
?>
Alles anzeigen
Und gebe in WPML unter
Verzeichnis für Standardsprache benutzen Was als Stamm-URL angezeigt werden soll:
HTML-Datei – bitte Pfad eingeben: absolut oder relativ zum WordPress-Installationsordner redirect.php
ein.
LG FloRet