[openssl-commits] [web] master update

Richard Levitte levitte at openssl.org
Thu Jul 9 22:41:08 UTC 2015


The branch master has been updated
       via  90d48d5e7c0d4785eae7d490351234613526fc1a (commit)
      from  46d1ed4f31a316a870bf319a5ba61cb08b2cb294 (commit)


- Log -----------------------------------------------------------------
commit 90d48d5e7c0d4785eae7d490351234613526fc1a
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 10 00:41:00 2015 +0200

    Move up the processing of 'latest' URLs
    
    If this isn't done first, the old distros rules will take them first.

-----------------------------------------------------------------------

Summary of changes:
 source/.htaccess.wml | 51 +++++++++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 24 deletions(-)

diff --git a/source/.htaccess.wml b/source/.htaccess.wml
index 9b79140..23ccfd7 100644
--- a/source/.htaccess.wml
+++ b/source/.htaccess.wml
@@ -4,18 +4,40 @@
 
 RewriteEngine on
 
+RewriteBase /source
+
+# First, rewrite all the 'latest' URLs</protect>
+<:{
+    my @tarballs =
+        sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, glob("openssl-*.tar.gz");
+    my %series = ();
+    foreach(@tarballs) {
+        my ($version, $serie) = /^openssl-((\d+\.\d+\.\d+)[a-z]*)\./;
+	$series{$serie} = $_;
+    }
+
+    my $latest = $series{ (reverse sort keys %series)[0] };
+    print "RewriteRule ^latest\\.tar\\.gz\$ $latest [L,R=302,NC]\n";
+
+    foreach (sort keys %series) {
+        my $rule = "openssl-$_-latest.tar.gz"; $rule =~ s|\.|\\.|g;
+	my $target = $series{$_};
+        print "RewriteRule ^$rule\$ $target [L,R=302,NC]\n";
+    }
+}:>
+<protect>
 # Old distro's are in subdirs.
 RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule (openssl-0.9.8.*) old/0.9.x/$1 [L]
+RewriteRule (openssl-0\.9\.8.*) old/0.9.x/$1 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1.0.0.*) old/1.0.0/openssl-$1 [L]
+RewriteRule openssl-(1\.0\.0.*) old/1.0.0/openssl-$1 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1.0.1.*) old/1.0.1/openssl-$1 [L]
+RewriteRule openssl-(1\.0\.1.*) old/1.0.1/openssl-$1 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule openssl-(1.0.2.*) old/1.0.1/openssl-$1 [L]
+RewriteRule openssl-(1\.0\.2.*) old/1.0.1/openssl-$1 [L]
 
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule openssl-(fips.*)  old/fips/openssl-$1 [L]
@@ -29,23 +51,4 @@ RewriteRule openssl-(fips.*)  old/fips/openssl-$1 [L]
 <Files *.gz.sha1>
     RemoveEncoding .gz
 </Files>
-
-</protect>RewriteBase /source
-<:{
-    my @tarballs =
-        sort grep /openssl-\d+\.\d+\.\d+[a-z]*\.tar\.gz$/, glob("openssl-*.tar.gz");
-    my %series = ();
-    foreach(@tarballs) {
-        my ($version, $serie) = /^openssl-((\d+\.\d+\.\d+)[a-z]*)\./;
-	$series{$serie} = $_;
-    }
-
-    my $latest = $series{ (reverse sort keys %series)[0] };
-    print "RewriteRule ^latest\\.tar\\.gz\$ $latest [R=302,NC]\n";
-
-    foreach (sort keys %series) {
-        my $rule = "openssl-$_-latest.tar.gz"; $rule =~ s|\.|\\.|g;
-	my $target = $series{$_};
-        print "RewriteRule ^$rule\$ $target [R=302,NC]\n";
-    }
-}:>
+</protect>


More information about the openssl-commits mailing list