Instant Post redirect

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Instant Post redirect

Post by cisco007 »

what was it?
heredia21
BBCoder IV
BBCoder IV
Posts: 179
Joined: 07 Apr 2010, 20:42
Contact:

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.
#1 BlackBerry News site - BlackBerry Empire. Come visit us!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: Instant Post redirect

Post by cisco007 »

you are not supposed to remove that, that is part of the original file!
my goodness!
heredia21
BBCoder IV
BBCoder IV
Posts: 179
Joined: 07 Apr 2010, 20:42
Contact:

Re: Instant Post redirect

Post by heredia21 »

Works fine now. What will it conflict with?
#1 BlackBerry News site - BlackBerry Empire. Come visit us!
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

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!
heredia21
BBCoder IV
BBCoder IV
Posts: 179
Joined: 07 Apr 2010, 20:42
Contact:

Re: Instant Post redirect

Post by heredia21 »

Ill report back if anything
#1 BlackBerry News site - BlackBerry Empire. Come visit us!
Locked