From 254d800a3b1c00c6fbb917bd456718e2ad2b2a6c Mon Sep 17 00:00:00 2001
From: ansuz <ansuz@transitiontech.ca>
Date: Tue, 2 Aug 2016 15:26:13 +0200
Subject: [PATCH] add a /p/ route so that we don't break old urls

---
 www/p/index.html | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 www/p/index.html

diff --git a/www/p/index.html b/www/p/index.html
new file mode 100644
index 000000000..caf716785
--- /dev/null
+++ b/www/p/index.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
+    <!--
+
+This file only exists for supporting some old URLs that we're trying not to break.
+
+Legacy support is tricky.
+
+:(
+
+    -->
+    <script>
+(function () {
+    if (/cryptpad\.fr$/i.test(window.location.hostname)) {
+        window.location.hostname = 'old.cryptpad.fr';
+    }
+}());
+    </script>
+</head>
+<body>
+    <p>There's nothing here.</p>
+    <p>You probably want to visit <strong><a href="https://old.cryptpad.fr">old.cryptpad.fr</a></strong></p>
+
+</body>
+</html>
+