Hi there,
I have a problem with my config/main.php management, that is I want my Yii site to be able to grab any “leftover” actions to be a certain action’s GET parameter.
The following is the example of config/main.php urlManager:
‘about’=>‘site/about’, // www.mydomain.com/about => Go to actionAbout in SiteController
‘contact’=>‘site/contact’, // www.mydomain.com/contact => Go to actionContact in SiteController
‘whatshouldiputhere’=>'site/dothings?param=whatshouldiputhere
The last line handles the URL so that:
mydomain.com/about1 => Go to actionDoThings in SiteController with $_GET[‘param’]=about1
mydomain.com/qwertyuiop => Go to actionDoThings in SiteController with $_GET[‘param’]=qwertyuiop
mydomain.com/a/b/c/d/e/f => Go to actionDoThings in SiteController with $_GET[‘param’]=a/b/c/d/e/f
mydomain.com/a?safety=isitprotected => Go to actionDoThings in SiteController with $_GET[‘param’]=a?safety=isitprotected, which then goes to a certain 404 redirect in actionDoThings
How can I achieve this?
Please help
Regards,
Ron