deandex
(Andra Zone)
October 21, 2013, 2:14pm
1
I have try to use custom-url-rule-classes from this guide
http://www.yiiframework.com/doc/guide/1.1/en/topics.url#using-custom-url-rule-classes
But i get an error : Undefined offset: 0
See on my attachment…
i have an application that save user information,
and i need every user can access from : http::/localhost/app/username
if i do not use custom url rule classes, i will get error 404
is there anyone can help me for this problem ?
4807
Hi
Try with this urlmanager and send me the feedback
‘urlManager’=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>/<action:\w+>/<id:\d+>/*'=>'<controller>/<action>/',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
deandex
(Andra Zone)
October 23, 2013, 3:31am
4
thank you for your reply chandran…
but i need config my urlmanager like this :
http://localhost/myapp/username
i have user account table, when user access that url so user account profile will be display… same like facebook profile url : http://facebook.com/deandex
how to config urlmanager to manage this. i have try guide http://www.yiiframework.com/doc/guide/1.1/en/topics.url#using-custom-url-rule-classes
but i get error like my attachment in first reply…
please… anyone can help me…