problem with url manager rules

Hi,

so I have this rule in my url manager configurations:




        'urlManager' => [

            'enablePrettyUrl' => true,

            'rules' => [

                '<language:\w{2}>/news'=>'news/front/index',

            ]

        ],



it works fine for a URL like www.example.com/en/news. but the problem occurs when the URL is www.example.com/en/news/, that last "/" seems to broke the link and a 404 exception is thrown.

I added the following rule to rules array but it didn’t solve it:




     '<language:\w{2}>/news/'=>'news/front/index',



any suggestions?