[limb-svn] r6122 - in 3.x/examples/shop: . www

svn at limb-project.com svn at limb-project.com
Mon Jul 9 17:53:47 MSD 2007


Author: wiliam
Date: 2007-07-09 17:53:47 +0400 (Mon, 09 Jul 2007)
New Revision: 6122
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6122

Added:
   3.x/examples/shop/.htaccess
Modified:
   3.x/examples/shop/setup.php
   3.x/examples/shop/www/.htaccess
Log:
-- better LIMB_VAR_DIR guessing
-- better .htaccess settings

Added: 3.x/examples/shop/.htaccess
===================================================================
--- 3.x/examples/shop/.htaccess	                        (rev 0)
+++ 3.x/examples/shop/.htaccess	2007-07-09 13:53:47 UTC (rev 6122)
@@ -0,0 +1,4 @@
+Allow from all
+
+RewriteEngine On
+RewriteRule ^(.*)$ www [L]

Modified: 3.x/examples/shop/setup.php
===================================================================
--- 3.x/examples/shop/setup.php	2007-07-09 12:27:35 UTC (rev 6121)
+++ 3.x/examples/shop/setup.php	2007-07-09 13:53:47 UTC (rev 6122)
@@ -14,8 +14,10 @@
 if(file_exists(dirname(__FILE__) . '/setup.override.php'))
   require_once(dirname(__FILE__) . '/setup.override.php');
 
- at define('LIMB_VAR_DIR', dirname(__FILE__) . '/var/');
- at define('WACT_STRICT_MODE', false);
+if(!defined('LIMB_VAR_DIR') && is_dir(dirname(__FILE__). '/var/'))
+  define('LIMB_VAR_DIR', dirname(__FILE__) . '/var/');
+elseif(defined('LIMB_VAR_DIR') && !is_dir(LIMB_VAR_DIR))
+  throw new Exception('Constant LIMB_VAR_DIR defined but no directory really exists at "' . LIMB_VAR_DIR. '"');
 
 @define('PRODUCT_IMAGES_DIR', dirname(__FILE__) . '/www/product_images/');
 

Modified: 3.x/examples/shop/www/.htaccess
===================================================================
--- 3.x/examples/shop/www/.htaccess	2007-07-09 12:27:35 UTC (rev 6121)
+++ 3.x/examples/shop/www/.htaccess	2007-07-09 13:53:47 UTC (rev 6122)
@@ -2,9 +2,8 @@
 
 RewriteEngine On
 
-RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-s
 RewriteCond %{REQUEST_FILENAME} !-l
-RewriteRule ^(.+)$ /index.php?%{QUERY_STRING} [L]
+RewriteRule ^(.+)$ index.php?%{QUERY_STRING} [L]



More information about the limb-svn mailing list