From 8b3720397c0570f27114e7d4d63fa418cb87174d Mon Sep 17 00:00:00 2001
From: Thomas Wood <thomas.wood09@imperial.ac.uk>
Date: Tue, 10 May 2016 20:02:41 +0100
Subject: [PATCH] htaccess: forward -dev subdomains over to the psvg-dev

---
 .htaccess | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/.htaccess b/.htaccess
index d56cfb5..770f242 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,17 +1,26 @@
 CheckSpelling Off
 
 RewriteEngine on
-RewriteCond %{HTTP_HOST} =www-rw.doc.ic.ac.uk [OR]
-RewriteCond %{HTTP_HOST} =www-rw-dev.doc.ic.ac.uk
+
+# Rewrite former site subdomain pages to new site pages
+RewriteCond %{HTTP_HOST} =www-rw.doc.ic.ac.uk
 RewriteRule . http://psvg.doc.ic.ac.uk/research/javascript.html [R=301,L]
 
-RewriteCond %{HTTP_HOST} =www-lrr.doc.ic.ac.uk [OR]
-RewriteCond %{HTTP_HOST} =www-lrr-dev.doc.ic.ac.uk
+RewriteCond %{HTTP_HOST} =www-lrr.doc.ic.ac.uk
 RewriteRule ^papers.html http://psvg.doc.ic.ac.uk/publications/ [R=301,L]
-RewriteCond %{HTTP_HOST} =www-lrr.doc.ic.ac.uk [OR]
-RewriteCond %{HTTP_HOST} =www-lrr-dev.doc.ic.ac.uk
+RewriteCond %{HTTP_HOST} =www-lrr.doc.ic.ac.uk
 RewriteRule ^ca($|/) http://psvg.doc.ic.ac.uk/research/concurrency.html [R=301,L]
 
+# And for -dev subdomains for testing purposes
+RewriteCond %{HTTP_HOST} =www-rw-dev.doc.ic.ac.uk
+RewriteRule . http://psvg-dev.doc.ic.ac.uk/research/javascript.html [R=301,L]
+
+RewriteCond %{HTTP_HOST} =www-lrr-dev.doc.ic.ac.uk
+RewriteRule ^papers.html http://psvg-dev.doc.ic.ac.uk/publications/ [R=301,L]
+RewriteCond %{HTTP_HOST} =www-lrr-dev.doc.ic.ac.uk
+RewriteRule ^ca($|/) http://psvg-dev.doc.ic.ac.uk/research/concurrency.html [R=301,L]
+
+# Bump any other subdomain request that gets here over to the main psvg site
 RewriteCond %{HTTP_HOST} !=psvg.doc.ic.ac.uk
 RewriteCond %{HTTP_HOST} !=psvg-dev.doc.ic.ac.uk
 RewriteCond %{HTTP_HOST} !=www-rr-dev.doc.ic.ac.uk
-- 
GitLab