Author:   Lars Michelsen <[email protected]>
Date:     Mon Apr 18 10:15:20 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Mon Apr 18 10:15:20 2011 +0200

Bugfix: Changed index.php/config.php redirect scripts

Changed them to ignore proto and host addresses to be
able to handle https frontend and http backend
processing when using mod_proxy.

---

 ChangeLog        |    3 +++
 share/config.php |    5 +----
 share/index.php  |    5 +----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6317506..60f0878 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 Core
   * Added show_in_multisite option to map global sections to hide maps from
   the multisite snapin
+  * Bugfix: Changed index.php/config.php redirect scripts to ignore proto and
+  host addresses to be able to handle https frontend and http backend
+  processing when using mod_proxy
 
 Frontend
   * Hiding search button when not permitted to
diff --git a/share/config.php b/share/config.php
index 6e525ea..50c559b 100644
--- a/share/config.php
+++ b/share/config.php
@@ -22,8 +22,5 @@
  *
  *****************************************************************************/
  
-header("Location: ". ((isset($_SERVER["HTTPS"])) ? 'https://': 'http://') . 
$_SERVER['HTTP_HOST'] 
-       . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' 
&& strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT']: 
'')
-       . rtrim(dirname($_SERVER['PHP_SELF']), '/\\')
-    . "/frontend/wui/index.php".(($_SERVER["QUERY_STRING"] != '') ? 
'?':'').$_SERVER["QUERY_STRING"]);
+header("Location: ".rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . 
"/frontend/wui/index.php".(($_SERVER["QUERY_STRING"] != '') ? 
'?':'').$_SERVER["QUERY_STRING"]);
 ?>
diff --git a/share/index.php b/share/index.php
index 0bdb651..967efc7 100644
--- a/share/index.php
+++ b/share/index.php
@@ -22,8 +22,5 @@
  *
  *****************************************************************************/
  
-header("Location: ". ((isset($_SERVER["HTTPS"])) ? 'https://': 'http://') . 
$_SERVER['HTTP_HOST'] 
-       . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' 
&& strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT']: 
'')
-       . rtrim(dirname($_SERVER['PHP_SELF']), '/\\')
-    . "/frontend/nagvis-js/index.php".(($_SERVER["QUERY_STRING"] != '') ? 
'?':'').$_SERVER["QUERY_STRING"]);
+header("Location: ".rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . 
"/frontend/nagvis-js/index.php".(($_SERVER["QUERY_STRING"] != '') ? 
'?':'').$_SERVER["QUERY_STRING"]);
 ?>


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to