user4238805
user4238805

Reputation:

Url Re-Writing with YII

I am trying to use the YII for URL Re-Writing. Is there any way to show the page extensions like .html or .php? Please help I am new in YII.

Upvotes: 1

Views: 26

Answers (1)

Justinas
Justinas

Reputation: 43549

Use urlSuffix parameter

array(
    ......
    'components'=>array(
        ......
        'urlManager'=>array(
            'urlFormat'=>'path',
            'rules'=>array(
                'pattern1'=>'route1',
                'pattern2'=>'route2',
                'pattern3'=>'route3',
            ),
            'urlSuffix' => '.html'
        ),
    ),
);

Upvotes: 2

Related Questions