From 3aa7986bbbc6437cbc442dd91b86dfeec301cfbe Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Tue, 5 Jan 2010 00:52:10 +0000 Subject: [PATCH] Complete reorg of files to make use of sprokets - config designed to offline and online versions of code base --- .htaccess | 11 ++++++++++- app.php | 2 +- index.php | 8 ++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.htaccess b/.htaccess index de8848ec..cf37fd28 100644 --- a/.htaccess +++ b/.htaccess @@ -9,7 +9,16 @@ RewriteBase / RewriteCond %{HTTP_HOST} ^www\.jsbin\.com$ [NC] RewriteRule ^(.*)$ http://jsbin.com/$1 [R=301,L] -# if the file or directory don't exist +# following two versions controlled through config.php +# rule to allow dynamic versioning of our code when live and hit a sprocketized script +RewriteRule js/[\d\.]+/(.*)\.js js/$2.js [QSA] + +# role a sprocket for offline and debug +RewriteRule js/debug/.*\.js$ sprocketize.php [QSA] +RewriteRule \.js$ sprocketize.php [QSA] +# RewriteRule \.css$ lib/sprocketize.php [QSA] + +# if the file or directory exists RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule .* - [L] diff --git a/app.php b/app.php index c43706e7..44de7478 100644 --- a/app.php +++ b/app.php @@ -1,5 +1,5 @@ - - - - - - + + \ No newline at end of file