routes: support uppercase characters in urls of posts and pages
This commit is contained in:
parent
015fb200a9
commit
448297e658
18
routes.php
18
routes.php
@ -8,12 +8,12 @@ return (function() {
|
|||||||
|
|
||||||
$routes = [
|
$routes = [
|
||||||
'Main' => [
|
'Main' => [
|
||||||
'/' => 'index',
|
'/' => 'index',
|
||||||
'{about,contacts}/' => 'about',
|
'{about,contacts}/' => 'about',
|
||||||
'feed.rss' => 'rss',
|
'feed.rss' => 'rss',
|
||||||
'([a-z0-9-]+)/' => 'page name=$(1)',
|
'([a-zA-Z0-9-]+)/' => 'page name=$(1)',
|
||||||
'articles/' => 'articles',
|
'articles/' => 'articles',
|
||||||
'articles/([a-z0-9-]+)/' => 'post name=$(1)',
|
'articles/([a-zA-Z0-9-]+)/' => 'post name=$(1)',
|
||||||
],
|
],
|
||||||
'Files' => [
|
'Files' => [
|
||||||
'files/' => 'files',
|
'files/' => 'files',
|
||||||
@ -28,10 +28,10 @@ return (function() {
|
|||||||
'Admin' => [
|
'Admin' => [
|
||||||
'admin/' => 'index',
|
'admin/' => 'index',
|
||||||
'admin/{login,logout,log}/' => '${1}',
|
'admin/{login,logout,log}/' => '${1}',
|
||||||
'([a-z0-9-]+)/{delete,edit}/' => 'page_${1} short_name=$(1)',
|
'([a-zA-Z0-9-]+)/{delete,edit}/' => 'page_${1} short_name=$(1)',
|
||||||
'([a-z0-9-]+)/create/' => 'page_add short_name=$(1)',
|
'([a-zA-Z0-9-]+)/create/' => 'page_add short_name=$(1)',
|
||||||
'articles/write/' => 'post_add',
|
'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/markdown-preview.ajax' => 'ajax_md_preview',
|
||||||
'admin/{uploads,errors}/' => '${1}',
|
'admin/{uploads,errors}/' => '${1}',
|
||||||
'admin/{auth,actions}-log/' => '${1}_log',
|
'admin/{auth,actions}-log/' => '${1}_log',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user