Summary: it seems that the urlManager component doesn’t like forward
slashes in patterns.
Details:
If I create a new web application using "yiic webapp", the following
configuration works fine:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
However, suppose that I change the "action" part of the pattern,
to give the following configuration:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<controller:\w+>/<action:[^/?]+>'=>'<controller>/<action>',
),
),
If I then attempt to load the front page of the web application in my
web browser, I get a Yii error page, with the following error message:
The URL pattern "<controller:\w+>/<action:[^/?]+>" for route "<controller>/<action>" is not a valid regular expression.
Information about my setup:
OS: Debian Linux 6.0.2
HTTP server: Apache/2.2.16
PHP version: 5.3.3
Browser: Chromium 6.0.472.63 (59945)
Yii: Version 1.1.8
This looks like a bug to me. I would report it in the normal way,
but I don’t have an account with the company that hosts the bug tracker.