Instant Post redirect

Guides & Snippets for phpBB3.
Try the Snippets here and share Your own Snippets

Re: Instant Post redirect

Post by cisco007 »

what was it?

Re: Instant Post redirect

Post by heredia21 »

Removed a block of code in the includes/functions.php file

Code: Select all

// Redirect via an HTML form for PITA webservers
   if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
   {
      header('Refresh: 0; URL=' . $url);

      echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
      echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '" xml:lang="' . $user->lang['USER_LANG'] . '">';
      echo '<head>';
      echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
      echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&', $url) . '" />';
      echo '<title>' . $user->lang['REDIRECT'] . '</title>';
      echo '</head>';
      echo '<body>';
      echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . str_replace('&', '&', $url) . '">', '</a>') . '</div>';
      echo '</body>';
      echo '</html>';

      exit;
   }
Searched for this all day. Works. But maybe you were right about server. lol. In the future if this happens to anyone heres the fix.

Re: Instant Post redirect

Post by cisco007 »

you are not supposed to remove that, that is part of the original file!
my goodness!

Re: Instant Post redirect

Post by heredia21 »

Works fine now. What will it conflict with?

Re: Instant Post redirect

Post by cisco007 »

don't know but like i said that might have something to do with your server, since that piece of code was from the original file, it might it might not cause you problems down the road, but we'll see!

Re: Instant Post redirect

Post by heredia21 »

Ill report back if anything