Yii Framework Forum: How to make url for static page shorter? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to make url for static page shorter? Rate Topic: -----

#1 User is offline   __agus 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 166
  • Joined: 22-April 10
  • Location:Yogyakarta, Indonesia

Posted 06 September 2010 - 11:13 AM

Hi,
How to make this url
http://localhost/blog/index.php?r=site/page&view=about
to be
http://localhost/blog/about
. Thanks
0

#2 User is offline   balrok 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 61
  • Joined: 13-June 10

Posted 06 September 2010 - 12:34 PM

inside protected/config/main.php in the urlmanager (i think urlmanager already exists in a default installation)
look here http://www.yiiframew...uide/topics.url
or try this:
         'urlManager'=>array(
             'urlFormat'=>'path',
             'showScriptName'=>false,
             'rules'=>array(
                 '<view>' => array('site/page'),
             ),

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users