Implement redirect to www
This commit is contained in:
parent
0a98c13cf8
commit
143a3f3efb
|
@ -3,9 +3,15 @@
|
||||||
use Mojolicious::Lite;
|
use Mojolicious::Lite;
|
||||||
|
|
||||||
get '/' => sub {
|
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';
|
} => 'index';
|
||||||
|
|
||||||
app->start();
|
app->start();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user