summaryrefslogtreecommitdiff
path: root/index.cgi
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-04-20 01:30:14 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-04-20 01:30:14 +0000
commitb624a2a9579d6340f9a8b1f8342eec86775ec84f (patch)
treea281dbe4cf998e91c0865095c94042383b5ea591 /index.cgi
parenta7a6c8c1d0830a0838c735b136a9ba867c6de4f8 (diff)
fix tag parser, theme cleanupHEADmaster
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.cgi b/index.cgi
index e9e2c55..e61d166 100755
--- a/index.cgi
+++ b/index.cgi
@@ -76,9 +76,9 @@ if ( $path =~ m/^\/(\d{4})\/(\d{2})\/([^\/]+)$/ ) {
@args = ( year => $1, month => $2 );
} elsif ( $path =~ m/^\/(\d{4})\/?$/ ) {
@args = ( year => $1 );
-} elsif ( $path =~ m/^\/Page\/(\d+)$/ ) {
+} elsif ( $path =~ m/^\/[Pp]age\/(\d+)$/ ) {
@args = ( page => $1 );
-} elsif ( $path =~ m/^\/Tags\/(\w+)$/ ) {
+} elsif ( $path =~ m/^\/[Tt]ags\/([\w_-]+)$/ ) {
@args = ( tag => $1 );
} elsif ( $path =~ m/^\/rss\.xml$/ ) {
$output = \&output_rss;
@@ -125,6 +125,7 @@ sub output_article {
}
} else {
$template->param( error => $page_not_found_error );
+ $template->param( notfound => 1 );
@status = ( -status => '404 Not Found' );
}
print $cgi->header(@status), $template->output;