We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fb2dfe commit 1f37c81Copy full SHA for 1f37c81
app.pl
@@ -0,0 +1,26 @@
1
+#!/usr/bin/env perl
2
+
3
+use Mojolicious::Lite;
4
5
+my $app = $ENV{MOJO_APP};
6
+$app->{static}->root('html');
7
8
+get '(*dir)/:file' => sub {
9
+ my $self = shift;
10
+ my $dir = $self->param('dir');
11
+ my $file = $self->param('file');
12
+ return $self->redirect_to("/$dir/$file.html");
13
+};
14
15
+get '(*dir)/' => sub {
16
17
18
+ return $self->redirect_to("/$dir/index.html");
19
20
21
+get '/' => sub {
22
23
+ return $self->redirect_to('/index.html');
24
25
26
+$app->start;
0 commit comments