From f00c5f3eae3253b6f951f9a5b8c9144675b8e6a8 Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Sat, 6 Nov 2010 08:46:52 +0000 Subject: [PATCH 1/2] check for apache modules to prevent vhost from dieing --- .htaccess | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.htaccess b/.htaccess index 4db1c8331b8..9f38ff7dabc 100644 --- a/.htaccess +++ b/.htaccess @@ -1,16 +1,21 @@ # the rewrite engine requires the ability to follow sym links Options +FollowSymLinks -RewriteEngine On -RewriteRule ^themes/([a-zA-Z\-\_\0-9]+)\/$ combine.php?type=css&theme=$1 -RewriteRule ^js/all combine.php?type=javascript + + RewriteEngine On + RewriteRule ^themes/([a-zA-Z\-\_\0-9]+)\/$ combine.php?type=css&theme=$1 + RewriteRule ^js/all combine.php?type=javascript + # Turn on Expires and set default to 0 -ExpiresActive On -ExpiresDefault "access" - + + ExpiresActive On + ExpiresDefault "access" + # cache text, css, and javascript files for one week -Header set Cache-Control "max-age=1" + + Header set Cache-Control "max-age=1" + From 176d87d898603e4dd281fdf062655e988ec743ec Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Sat, 6 Nov 2010 08:47:20 +0000 Subject: [PATCH 2/2] display useful error if unable to create combine directory --- combine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/combine.php b/combine.php index 74d6cb319fd..e95ea229fed 100644 --- a/combine.php +++ b/combine.php @@ -149,7 +149,7 @@ if ($write_combined) { if(!file_exists($combinedir)) { - mkdir($combinedir, 0700); + @mkdir($combinedir, 0700) or die("Unable to create combine directory {$combinedir}. Please check permissions."); } $filename = ''; @@ -204,4 +204,4 @@ } } } - \ No newline at end of file +