get('/blog.php', function() { header('Location: /old-blog/' . (int)filter_input(INPUT_GET, 'p', FILTER_SANITIZE_NUMBER_INT)); return 302; }); $router->get('/blog-post.php', function() { header('Location: /old-blog/' . (int)filter_input(INPUT_GET, 'p', FILTER_SANITIZE_NUMBER_INT)); return 302; }); $router->get('/blog/:id', function(string $id) { header('Location: /old-blog/' . intval($id)); return 302; }); $router->get('/old-blog', function() { $blogInfo = json_decode(file_get_contents(MKI_DIR_PUB . '/old_blog_posts.json')); $body = fm_component('header', [ 'title' => 'flash.moe / old blog posts', ]); $body .= <<
{$preview}
Continue reading' . trim($paragraph) . '
'; $body .= '