From 448297e658c96100da2377648e92770c93d19f6d Mon Sep 17 00:00:00 2001 From: "E. S." Date: Tue, 5 Nov 2024 02:17:39 +0300 Subject: [PATCH] routes: support uppercase characters in urls of posts and pages --- routes.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/routes.php b/routes.php index 115eed4..1ca75e6 100644 --- a/routes.php +++ b/routes.php @@ -8,12 +8,12 @@ return (function() { $routes = [ 'Main' => [ - '/' => 'index', - '{about,contacts}/' => 'about', - 'feed.rss' => 'rss', - '([a-z0-9-]+)/' => 'page name=$(1)', - 'articles/' => 'articles', - 'articles/([a-z0-9-]+)/' => 'post name=$(1)', + '/' => 'index', + '{about,contacts}/' => 'about', + 'feed.rss' => 'rss', + '([a-zA-Z0-9-]+)/' => 'page name=$(1)', + 'articles/' => 'articles', + 'articles/([a-zA-Z0-9-]+)/' => 'post name=$(1)', ], 'Files' => [ 'files/' => 'files', @@ -28,10 +28,10 @@ return (function() { 'Admin' => [ 'admin/' => 'index', 'admin/{login,logout,log}/' => '${1}', - '([a-z0-9-]+)/{delete,edit}/' => 'page_${1} short_name=$(1)', - '([a-z0-9-]+)/create/' => 'page_add short_name=$(1)', + '([a-zA-Z0-9-]+)/{delete,edit}/' => 'page_${1} short_name=$(1)', + '([a-zA-Z0-9-]+)/create/' => 'page_add short_name=$(1)', 'articles/write/' => 'post_add', - 'articles/([a-z0-9-]+)/{delete,edit}/' => 'post_${1} short_name=$(1)', + 'articles/([a-zA-Z0-9-]+)/{delete,edit}/' => 'post_${1} short_name=$(1)', 'admin/markdown-preview.ajax' => 'ajax_md_preview', 'admin/{uploads,errors}/' => '${1}', 'admin/{auth,actions}-log/' => '${1}_log',