Add redirect_from && redirect_to to router options

+ Also add * for all methods shortcut
This commit is contained in:
slawkens
2023-02-03 12:18:35 +01:00
parent 7d38945e8d
commit 63d2c5c6b5
5 changed files with 53 additions and 27 deletions

View File

@@ -9,10 +9,10 @@
*/
return [
['GET', '', 'news'], // redirect empty URL to news
['GET', '', '__redirect__/news'], // redirect empty URL to news
['GET', 'news/archive/{id:[0-9]+}[/]', 'news/archive.php'],
[['GET', 'POST'], 'account/base[/]', '404.php'], // this is to block account/base.php
['*', 'account/base[/]', '404.php'], // this is to block account/base.php
[['GET', 'POST'], 'account/password[/]', 'account/change_password.php'],
[['GET', 'POST'], 'account/register/new[/]', 'account/register_new.php'],
[['GET', 'POST'], 'account/email[/]', 'account/change_email.php'],