From: Roland Häder Date: Tue, 24 May 2011 17:09:38 +0000 (+0000) Subject: Spiders can handle 302 replies nicely these days ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be56ab1693779dc838d8d2da21f9a52857003ccd;p=mailer.git Spiders can handle 302 replies nicely these days ... --- diff --git a/inc/functions.php b/inc/functions.php index 45fb99ea6c..da112b43fa 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -550,17 +550,8 @@ function redirectToUrl ($URL, $allowSpider = true) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'URL=' . $URL); //* DEBUG: */ die($URL); - // Simple probe for bots/spiders from search engines - if ((isSpider()) && ($allowSpider === true)) { - // Set HTTP-Status - setHttpStatus('200 OK'); - - // Set content-type here to fix a missing array element - setContentType('text/html'); - - // Output new location link as anchor - outputHtml('' . secureString($URL) . ''); - } elseif (!headers_sent()) { + // We should not sent a redirect if headers are already sent + if (!headers_sent()) { // Clear output buffer clearOutputBuffer();