Spiders can handle 302 replies nicely these days ...
authorRoland Häder <roland@mxchange.org>
Tue, 24 May 2011 17:09:38 +0000 (17:09 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 24 May 2011 17:09:38 +0000 (17:09 +0000)
inc/functions.php

index 45fb99ea6cef95a853db34b4d9eb155ecad7a356..da112b43fab7d71e293f3c5c0fe2df27ad410655 100644 (file)
@@ -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('<a href="' . $URL . '"' . $rel . '>' . secureString($URL) . '</a>');
-       } elseif (!headers_sent()) {
+       // We should not sent a redirect if headers are already sent
+       if (!headers_sent()) {
                // Clear output buffer
                clearOutputBuffer();