naveen107
(Naveen Svn107)
January 17, 2013, 3:01pm
1
when i am using this [color="#2E8B57 "]’<view>’=>‘site/page’,’<view:\w+>’ => ‘site/page’ [/color]
I got the url like this [color="#2E8B57 "]projectname.com/index.php/site/page?view=about [/color]
but i really need like this
[color="#2E8B57 "]projectname.com/about [/color]
can any one support me
rootbear
(Alex Xm)
January 17, 2013, 4:25pm
2
try:
'urlManager'=>array(
'urlFormat'=>'path', //<--1
'rules'=>array(
'<view:\w+>' => 'site/page',
//~~~
),
'showScriptName'=>false, //<--2
),
fwallen
(Frank Wallen)
January 17, 2013, 7:50pm
3
You’ll need to use an .htaccess and tiny modification to your routing rules. Check out this link here to start: http://www.yiiframework.com/wiki/214/url-hide-index-php/
That should be pretty helpful, but I have run into some caveats: read access on the .htaccess file and a setting in the apache config to allow overrides from an .htaccess file.