Mahlzeit.
Ich hab mal ne Frage zur localconf.php. Nehmen wir mal an, ich will auf meiner Domain die Seite
www.meineDomain.de/en/asdasde.html
aufrufen. Die gibt es natürlich nicht und stattdessen soll er zu
www.meineDomain.de/en/
umleiten. Äquivalent natürlich das Gleiche bei /de/ oder /fr/ usw.
Bei so was bin ich aber total überfragt und google mir n Wolf. ^^ Hat jemand einen Hint für mich? RealURL ist vorhanden by the way und ansonsten läuft die Seite auch echt nice. Geht halt nur um Links, die es nich gibt.
-bedank-
Ok, ich glaube...ich hab´s. Schön isses nich aber es funzt.
localconf.php
if (substr($_SERVER['REQUEST_URI'], 0, 4) == '/de/') {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:de/';
} else if (substr($_SERVER['REQUEST_URI'], 0, 4) == '/en/') {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:en/';
} else if (substr($_SERVER['REQUEST_URI'], 0, 4) == '/fr/') {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:fr/';
} else if (substr($_SERVER['REQUEST_URI'], 0, 4) == '/pl/') {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:pl/';
} else if (substr($_SERVER['REQUEST_URI'], 0, 4) == '/tr/') {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:tr/';
} else {
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:de/';
}
Wer Alternativen haben sollte, ich bin dafür jederzeit offen.
Hallo Teilzeiphilosoph, wie wäre es hiermit:
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'REDIRECT:'.substr($_SERVER['REQUEST_URI'], 1, 3);