Topic: Redirect difficulties at login/logout with integrated site
I'm having problems when trying to integrate my site with PunBB following the instructions here. My login form has a hidden field
'<input type="hidden" name="redirect_url" value="'.$_SERVER['SCRIPT_NAME'].'" />'
and I've altered the logout section of login.php to
redirect($_SERVER['HTTP_REFERER'], $lang_login['Logout redirect']);
so that logging in and out will return to the previous page, but when I do so from a page outside the forums directory the beginning part of the URL keeps getting doubled up like
http://localhost/mydir/forums/http://localhost/mydir/mypage.php
Should I just remove these two lines from the redirect function at line 864~ of functions.php? Are they there for a reason?
if (strpos($destination_url, $pun_config['o_base_url']) !== 0)
$destination_url = $pun_config['o_base_url'].'/'.$destination_url;