combine ifs
This commit is contained in:
@@ -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"){
|
||||
|
||||
Reference in New Issue
Block a user