]> git.mjollnir.org Git - s9y.git/commitdiff
we need to redirect to an absolute url
authorgarvinhicking <garvinhicking>
Wed, 15 Feb 2006 14:39:09 +0000 (14:39 +0000)
committergarvinhicking <garvinhicking>
Wed, 15 Feb 2006 14:39:09 +0000 (14:39 +0000)
index.php

index 424a73a493274fab234616808bc5e776c59c4d2d..0c9739da4d87ff12f18bc89ab538563842f82d75 100644 (file)
--- a/index.php
+++ b/index.php
@@ -227,7 +227,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
         $comment['parent_id'] = $serendipity['POST']['replyTo'];
         if (!empty($comment['comment'])) {
             if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) {
-                $sc_url = $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
+                $sc_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . (strstr($_SERVER['REQUEST_URI'], '?') ? '&' : '?') . 'serendipity[csuccess]=' . (isset($serendipity['csuccess']) ? $serendipity['csuccess'] : 'true');
                 if (serendipity_isResponseClean($sc_url)) {
                     header('Location: ' . $sc_url);
                 }