diff --git a/wethepeople.pl b/wethepeople.pl index a4fd890..1de9328 100755 --- a/wethepeople.pl +++ b/wethepeople.pl @@ -3,9 +3,15 @@ use Mojolicious::Lite; get '/' => sub { - my ($c) = @_; + my ($c) = @_; + my $hostHeader = $c->req->headers->host(); - $c->render(); + if ($hostHeader =~ /www.wethepeople.win(|:[0-9]{1,5})/) { + $c->render() + } + else { + $c->redirect_to('http://www.wethepeople.win') + } } => 'index'; app->start();