websitename.de/forum/login.php?redirect=forumviewforum.php&f=6
Das rot markierte "forum" darf dort nicht stehen. Da das auf allen Seiten im Login und Logout passiert, vermute ich mal, dass der String falsch zusammengesetzt wird, weil mein Board nicht im Root-Verzeichnis, sondern eine Ebene tiefer im Ordner "forum" liegt.
Der Teil, der die URL ausliest und übergibt, befindet sich in der functions.php:
Code: Alles auswählen
//-- mod : Login Redirection Suite ---------------------------------------------
//-- add
function get_redirect($link=false, $amp=false)
{
global $HTTP_SERVER_VARS;
global $phpEx;
$url_page = '';
//
// Borrowed code from login.php
//
$url_to = $HTTP_SERVER_VARS['QUERY_STRING'];
if ( preg_match("/^redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $url_to, $url_matches) )
{
$url_to = ( !empty($url_matches[3]) ) ? $url_matches[3] : $url_matches[1];
$url_match = explode('&', $url_to);
if ( count($url_match) > 1 )
{
for ($i = 1; $i < count($url_match); $i++)
{
if ( !ereg("sid=", $url_match[$i]) )
{
if ( $url_page != '' )
{
$url_page .= ( $amp ? '&' : '&' );
}
$url_page .= $url_match[$i];
}
}
$url_page = $url_match[0] . ( $link ? ( $amp ? '&' : '&' ) : '?' ) . $url_page;
}
else
{
$url_page = $url_match[0];
}
}
else if ( preg_match("/^logout=true&redirect=([a-z0-9\.#\/\?&=\+\-_]+)/si", $url_to, $url_matches) )
{
$url_to = ( !empty($url_matches[3]) ) ? $url_matches[3] : $url_matches[1];
$url_match = explode('&', $url_to);
if ( count($url_match) > 1 )
{
for ($i = 1; $i < count($url_match); $i++)
{
if ( !ereg("sid=", $url_match[$i]) )
{
if ( $url_page != '' )
{
$url_page .= ( $amp ? '&' : '&' );
}
$url_page .= $url_match[$i];
}
}
$url_page = $url_match[0] . ( $link ? ( $amp ? '&' : '&' ) : '?' ) . $url_page;
}
else
{
$url_page = $url_match[0];
}
}
if ( strstr(urldecode($url_page), "\n") || strstr(urldecode($url_page), "\r") )
{
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
}
if ( empty($url_page) )
{
$url_page = "index." . $phpEx;
}
return $url_page;
}
function get_url($amp=false)
{
global $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_SERVER_VARS;
global $board_config;
//
// Extract the query variables from the url
//
parse_str($HTTP_SERVER_VARS['QUERY_STRING'], $outputs);
foreach ($outputs as $var => $string)
{
//
// Remove the sid variable from the url
//
if ($string != $outputs['sid'])
{
$query_vars[] = $var . '=' . $string;
}
}
//
// Don't whine if thier is an error, any urls that don't have query's
//
$queryVars = @implode(( $amp ? '&' : '&' ), $query_vars);
//
// Replace the script_path with nothing since the link is always going to be in the same place as the path of the file
//
$php_self_var = str_replace($board_config['script_path'], '', $HTTP_SERVER_VARS['PHP_SELF']);
//
// Put the url back together
//
$url = (!empty($query_vars)) ? $php_self_var . ( $amp ? '&' : '&' ) . $queryVars : $php_self_var;
return $url;
}
//-- fin mod : Login Redirection Suite -----------------------------------------
Vielen Dank vorab für eure Hilfe!!
Jens