From 8f84eef93f2ff581d24aa64c27d2fb71a17d62a3 Mon Sep 17 00:00:00 2001 From: Thaddee Tyl Date: Sun, 9 Feb 2014 19:17:40 +0100 Subject: [PATCH] Redirect the root. --- server.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server.js b/server.js index c47442c..83dd885 100644 --- a/server.js +++ b/server.js @@ -614,6 +614,13 @@ function(data, match, end, ask) { } }); +// Redirect the root to the website. +camp.route(/^\/$/, function(data, match, end, ask) { + ask.res.statusCode = 302; + ask.res.setHeader('Location', 'http://shields.io'); + ask.res.end(); +}); + // Escapes `t` using the format specified in // function escapeFormat(t) {