ycom
ycom copied to clipboard
Redirect nach Login in Unterordner Installation fehlerhaft
In einer Unterordner Installation wird der Unterordner doppelt in die URL gehängt. yCom 4.0.3 und Redaxo 5.12.0
Hab es mal Quick and Dirty für mich gefixt: In: /ycom/plugins/auth/lib/ycom_auth.php Ab Zeile 510: Vorher:
if (!preg_match('/http(s?)\:\/\//i', $returnTo)) {
$returnTo = rex_yrewrite::getFullPath(('/' == substr($returnTo, 0, 1) ? substr($returnTo, 1) : $returnTo));
}
Nachher:
if (!preg_match('/http(s?)\:\/\//i', $returnTo)) {
$frontendUrl = rex_url::frontend();
if (strpos($returnTo, $frontendUrl) !== false) {
$returnTo = str_replace($frontendUrl, '/', $returnTo);
}
$returnTo = rex_yrewrite::getFullPath(('/' == substr($returnTo, 0, 1) ? substr($returnTo, 1) : $returnTo));
}
LGTM 👍 Habe das lokal mit Unterorder und produktiv ohne Unterordner getestet und passt. Jetzt funktioniert der Redirect auch lokal. Habe allerdings nicht näher untersucht :)
Vielen Dank - ist übernommen