From c0dc531ebefd8912819f3b6c8bda1fed3c7e750c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 31 Jan 2024 06:11:00 +0300 Subject: make it simple, but not simpler --- routes.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 routes.php (limited to 'routes.php') diff --git a/routes.php b/routes.php new file mode 100644 index 0000000..8cda1bb --- /dev/null +++ b/routes.php @@ -0,0 +1,23 @@ + [ + '/' => 'index', + 'contacts/' => 'contacts', + 'projects.html' => 'projects', + 'blog/(\d+)/' => 'post_id id=$(1)', + 'feed.rss' => 'rss', + 'rss/' => 'rss', + '([a-z0-9-]+)/' => 'auto name=$(1)' + ], + 'Admin' => [ + 'admin/' => 'index', + 'admin/{login,logout,log}/' => '${1}', + '([a-z0-9-]+)/{delete,edit}/' => 'auto_${1} short_name=$(1)', + '([a-z0-9-]+)/create/' => 'page_add short_name=$(1)', + 'write/' => 'post_add', + 'admin/markdown-preview.ajax' => 'ajax_md_preview', + 'uploads/' => 'uploads', + 'uploads/{edit_note,delete}/(\d+)/' => 'upload_${1} id=$(1)' + ], +]; \ No newline at end of file -- cgit v1.2.3