Redirect out of forum with append_sid?

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Redirect out of forum with append_sid?

Postby Leachim » Sat Dec 12, 2009 11:03 am

Hi there,

I have one question. I have an website with forum and Im using session management from phpBB3. I have -www.domain.tld and -forum.domain.tld and my problem is: When Im logging in from -www.domain.tld I want to be redirected back to -www.domain.tld, not to forum.domain.tld. Same problem with logging out.

Can anybody help me?

Thank you.
Posts: 2
Joined: Sat Dec 12, 2009 10:59 am


Re: Redirect out of forum with append_sid?

Postby SeO » Mon Dec 14, 2009 12:32 pm

Code: Select all
      // custom allow redirect across sub domains
      $disable_cd_check = strpos($url_parts['host'], trim($config['cookie_domain'], '.')) !== false ? true : $disable_cd_check;
      // custom

After :
Code: Select all
   if ($url_parts === false)
      // Malformed url, redirect to current page...
      $url = generate_board_url() . '/' . $user->page['page'];
   else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))

In includes/functions.php.

This code allow redirects across all sub-domains. It performs the check on the cookie domain because it should not mention the sub-domain and should be prefixed with a dot (".") (eg to be usable across all sub domains.
So this only implies that you properly configured phpBB Server and Cookie settings

Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Return to phpBB Forum


  • Related topics
    Last post

Who is online

Users browsing this forum: YandexBot [Bot] and 17 guests