Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66489 - website/public_html/beta/doc
From: dnljms_at_[hidden]
Date: 2010-11-10 16:22:08


Author: danieljames
Date: 2010-11-10 16:22:06 EST (Wed, 10 Nov 2010)
New Revision: 66489
URL: http://svn.boost.org/trac/boost/changeset/66489

Log:
Trying out serving the beta docs.
Text files modified:
   website/public_html/beta/doc/.htaccess | 9 +++++----
   website/public_html/beta/doc/display_libs.php | 5 +++--
   2 files changed, 8 insertions(+), 6 deletions(-)

Modified: website/public_html/beta/doc/.htaccess
==============================================================================
--- website/public_html/beta/doc/.htaccess (original)
+++ website/public_html/beta/doc/.htaccess 2010-11-10 16:22:06 EST (Wed, 10 Nov 2010)
@@ -20,19 +20,20 @@
 RewriteRule ^libs/([0-9_]+/.*\.(?:png|gif|jpg|jpeg|jpe|css|js|pdf|dtd))$ archives/boost_$1 [L,NC]
 
 # Redirect from symbolic names to current versions.
-RewriteRule ^libs/release(/.*)?$ libs/1_44_0$1 [R]
+RewriteRule ^libs/release(/.*)?$ libs/1_45_0_beta1$1 [R]
+RewriteRule ^libs/1_45_0(/.*)?$ libs/1_45_0_beta1$1 [R]
 RewriteRule ^libs/development(/.*)?$ libs/1_44_0$1 [R]
 
 #~ # In case we don't get a file looking URI we send it to the index.html file.
 #~ # - With some exceptions.
 RewriteCond %{REQUEST_URI} !/(Jamroot|Jamfile|ChangeLog)$
-RewriteRule ^libs/([0-9_]+)/([^.]*[^./])/?$ libs/$1/$2/index.html [R]
+RewriteRule ^libs/([0-9_]+(?:beta[0-9]*)?)/([^.]*[^./])/?$ libs/$1/$2/index.html [R]
 
 # Rewrite specific versions to the dynamic handlers.
-RewriteRule ^libs/([0-9_]+)/?$ libraries.php/$1 [L]
+RewriteRule ^libs/([0-9_]+(?:beta[0-9]*)?)/?$ libraries.php/$1 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^libs/([0-9_]+)/(.+)$ display_libs.php/boost_$1/$2 [L]
+RewriteRule ^libs/([0-9_]+(?:beta[0-9]*)?)/(.+)$ display_libs.php/boost_$1/$2 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^libs/?(.*)$ libraries.php$1 [L]

Modified: website/public_html/beta/doc/display_libs.php
==============================================================================
--- website/public_html/beta/doc/display_libs.php (original)
+++ website/public_html/beta/doc/display_libs.php 2010-11-10 16:22:06 EST (Wed, 10 Nov 2010)
@@ -61,8 +61,9 @@
 }
 
 $location = get_archive_location('@^[/]([^/]+)[/](.*)$@',$_SERVER["PATH_INFO"],true,false);
-
-if (boost_future_version($location['version'])) {
+$is_beta = strpos($location['version'], 'beta') !== FALSE &&
+ strpos($_SERVER['HTTP_HOST'], 'beta') !== FALSE;
+if (!$is_beta && boost_future_version($location['version'])) {
     file_not_found($location['file'],
         "Documentation for this version has not been uploaded yet. ".
         "Documentation is only uploaded when it's fully released, ".


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk