//* 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();