combine ifs

This commit is contained in:
Tommy Parnell
2016-07-20 19:11:42 -04:00
parent 3368fe318b
commit ae6707464e

View File

@@ -6,10 +6,11 @@ var port = process.env.PORT || 3000;
app.get('/*', function (req, res) {
var host = S(req.headers.host.split(':')[0]);
var hostToString = host.toString();
//todo regex
if(host === "tparnell.io"){
return res.redirect(301, 'https://about.tparnell.io');
}
if(host === "tommyparnell.com"){
if(host === "tommyparnell.com" || host === "www.tommyparnell.com"){
return res.redirect(301, 'https://about.tommyparnell.com');
}
if(host === "terribledev.io"){