[Phamm] [PATCH] phamm-0.5.15: correctly use Absolute URL for initial redirect
kabe at sra-tohoku.co.jp
kabe at sra-tohoku.co.jp
Wed Feb 4 08:55:16 CET 2009
phamm-0.5.15 seems to issue
Location: main.php
for 302 redirection on initial web access to <path>/[index.php],
which should be Absolute URL (http:///.../<path>/main.php) per RFC.
Some browsers (correctly) refuses this relative URL redirection.
The patch will pass back absolute URL thanks to lib/common.php .
--
kabe
--- phamm-0.5.15/www-data/index.php.dist 2006-05-14 00:57:30.000000000 +0900
+++ phamm-0.5.15/www-data/index.php 2009-02-04 16:47:34.000000000 +0900
@@ -1,7 +1,10 @@
<?php
// Redirect to main file
-header('Location: main.php');
+// 302 redirect needs Absolute URL, not just "main.php",
+// although some browsers seem to work.
+require_once("../lib/common.php");
+refresh('main.php');
?>
<html></html>
More information about the Phamm
mailing list