Skip to content

Commit

Permalink
changed URL-rule. if Tree::REQUEST_PARAM_PATH is part of the pretty-u…
Browse files Browse the repository at this point in the history
…rl path disable url-encoding to prevent encoding of '/' in parent-path. see yiisoft/yii2#4582
  • Loading branch information
handcode committed Dec 14, 2017
1 parent 674a8e8 commit f1d3e2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ public function bootstrap($app)
[
// pages default page route
['class' => PageUrlRule::className()],
'p/<'.Tree::REQUEST_PARAM_PATH.':[a-zA-Z0-9_\-\./\+]*>/<'.Tree::REQUEST_PARAM_SLUG.':[a-zA-Z0-9_\-\.]*>-<'.Tree::REQUEST_PARAM_ID.':[0-9]*>.html' => 'pages/default/page',
[
'pattern' => 'p/<'.Tree::REQUEST_PARAM_PATH.':[a-zA-Z0-9_\-\./\+]*>/<'.Tree::REQUEST_PARAM_SLUG.':[a-zA-Z0-9_\-\.]*>-<'.Tree::REQUEST_PARAM_ID.':[0-9]*>.html',
'route' => 'pages/default/page',
'encodeParams' => false,
],
'p/<'.Tree::REQUEST_PARAM_SLUG.':[a-zA-Z0-9_\-\.]*>-<'.Tree::REQUEST_PARAM_ID.':[0-9]*>.html' => 'pages/default/page',

// Backward compatibility
Expand Down

0 comments on commit f1d3e2c

Please sign in to comment.