Actually i have a url: www.example.com/test
The name "test" consider as id in yii. so that i declare the following line in my config/main.php
'<id>'=>'/site/test/',
Now i need the name of test and then i redirect the page which is in "site/test/test1/testing.php".
I tried in my sitecontroller,
if (isset($_GET['id']))
{
$ptype = $_GET['id'];
switch ($ptype) {
case 'test':
$this->renderPartial('test/test1/testing');
break;
default:
}
}
But its not working. its only redirect to my index page.
I don’t know how is get the name of “test”, which is in my url?
Anyone plz?