HTTP/1.1-compliant redirecting
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Jul 2003 08:32:05 +0000 (08:32 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Jul 2003 08:32:05 +0000 (08:32 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5406 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/mailto.php
src/options_highlight.php
src/options_identities.php
src/redirect.php

index bd19c53445071ac3312fa1ec3823ffaf81253a5a..1a4098487a9171562e63b03a501de36eb362a9bb 100644 (file)
@@ -69,5 +69,5 @@ $url = urlencode($url);
 /* $redirect .= $url; */
 $redirect = 'login.php?mailto=' . $url;
 session_write_close();
-header('Location: ' . $redirect);
+header('Location: ' .get_location(). $redirect);
 ?>
index fe5b24dba7fadc7b656e2ae82674af956fb3ea06..381a4322b749b3d2cbe8af721e5300eb1f93cce3 100644 (file)
@@ -97,7 +97,7 @@ if (isset($theid) && ($action == 'delete') ||
 
     setPref($data_dir, $username, 'hililist', serialize($message_highlight_list));
 
-    header( 'Location: options_highlight.php' );
+    header( 'Location: ' .get_location(). '/options_highlight.php' );
     exit;
 } else if ($action == 'save') {
 
index 6927c0aee2a9df5f99085c9a1c5ac469aacd8fcb..d2dfd035924558a7fd5d61bfa78c8991d3439b16 100644 (file)
@@ -32,7 +32,7 @@ if (!empty($_POST)) {
 
     if (isset($return)) {
        SaveUpdateFunction();
-       header('Location: options_personal.php');
+       header('Location: '.get_location().'/options_personal.php');
        exit();
     }
     
index 5658995da244fcd51c05518da4e05da29b1e9b3a..6f6f69971032a9940dbcdf3ea192fe01f742a360 100644 (file)
@@ -138,20 +138,22 @@ if ($javascript_setting != SMPREF_JS_ON){
 setPref($data_dir, $username, 'javascript_on', $js_pref);
 
 /* Compute the URL to forward the user to. */
-$redirect_url = 'webmail.php';
+$redirect_url = $location . '/webmail.php';
 
 if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SESSION) ) {
     sqsession_unregister('session_expired_location');
     $compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0);
     if ($compose_new_win) {
+        // do not prefix $location here because $session_expired_location is set to PHP_SELF
+        // of the last page
         $redirect_url = $session_expired_location;
     } elseif ( strpos($session_expired_location, 'webmail.php') === FALSE ) {
-        $redirect_url = 'webmail.php?right_frame='.urldecode($session_expired_location);
+        $redirect_url = $location.'/webmail.php?right_frame='.urldecode($session_expired_location);
     }
     unset($session_expired_location);
 }
 if($mailto != '') {
-    $redirect_url  = 'webmail.php?right_frame=compose.php&mailto=';
+    $redirect_url  = $location . '/webmail.php?right_frame=compose.php&mailto=';
     $redirect_url .= $mailto;
 }