routes: support uppercase characters in urls of posts and pages

This commit is contained in:
E. S. 2024-11-05 02:17:39 +03:00
parent 015fb200a9
commit 448297e658

View File

@ -11,9 +11,9 @@ return (function() {
'/' => 'index',
'{about,contacts}/' => 'about',
'feed.rss' => 'rss',
'([a-z0-9-]+)/' => 'page name=$(1)',
'([a-zA-Z0-9-]+)/' => 'page name=$(1)',
'articles/' => 'articles',
'articles/([a-z0-9-]+)/' => 'post name=$(1)',
'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',