diff index.php @ 43:dbc006408d2b

ASSUMES we have SetEnv PHP_VALUE "include_path =.:/var/test/private:/var/test/ywww:/usr/share/php" in apache2/.../test.conf use dl(...) for debug logging, defined in dlog.php use doAmazonRequest in amazonBookSearch use ../private/web.php (q.v., not in mercurial) for Aserver and Aassociates Started by updating from 40:c24ae74bf6d5, i.e. just before the bug on the main line
author Charlie Root
date Sat, 05 Jan 2019 18:00:10 -0500
parents 1bb0bc3d306a
children 38d209611508
line wrap: on
line diff
--- a/index.php	Sat Jan 05 06:21:12 2019 -0500
+++ b/index.php	Sat Jan 05 18:00:10 2019 -0500
@@ -1,4 +1,5 @@
 <?php
+include_once "dlog.php";
 
 if (isset($_SERVER["GEOIP_COUNTRY_CODE"])) {
 $country_code = $_SERVER["GEOIP_COUNTRY_CODE"];
@@ -7,34 +8,33 @@
 $country_code = $_SERVER["REDIRECT_GEOIP_COUNTRY_CODE"];
  }
  else {$country_code = "US" ; }
-file_put_contents('/var/ywww/debug/phpDebug',
-		  "cc: $country_code\n",
-		  FILE_APPEND);
+
+dl("cc: $country_code\n");
    
 switch($country_code) {
  case "CA":
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/ca/" );
+   Header ("Location: http://test.markup.co.uk/ywww/ca/" );
    break;
  case "DE":
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/de/" );
+   Header ("Location: http://test.markup.co.uk/ywww/de/" );
    break;
  case "FR":
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/fr/" );
+   Header ("Location: http://test.markup.co.uk/ywww/fr/" );
    break;			
  case "GB":
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/uk/" );
+   Header ("Location: http://test.markup.co.uk/ywww/uk/" );
    break;
  case "US":
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/us/" );
+   Header ("Location: http://test.markup.co.uk/ywww/us/" );
    break;
  default:
    Header( "HTTP/1.1 301 Moved Permanently" );
-   Header ("Location: http://www.yournextread.com/us/" );
+   Header ("Location: http://test.markup.co.uk/ywww/us/" );
    break;	
  }	  
 	?>