CUrlManager for creating urls not to parsing them?

Hi, i would like to use the friendly url rules of my app only to create urls, not to parse them on each request.

The application is expected to have high traffic, so i am looking for ways to improve the performance, in this case url parsing. I think it could be faster including separate mod_rewrite rules inside the htaccess file and then ignoring parsing from Yii part.

I thoght about extending CUrlManager to create a specific one for this task, but i can’t find out the solution, some help would be so grateful.

Thanks.

If you have a mod_rewrite rule that will convert he “nice” url to a yii syntax like index.php?site/view?page=about… then you don’t need to do or disable anything… they will not be parsed by Yii :)

I have the following rules inside the htaccess




RewriteRule ^([a-z-]+)/([a-z-]+)/?$ index.php?r=site/index&state=$1&city=$2 [L]

RewriteRule ^([a-z-]+)/?$ index.php?r=site/index&state=$1 [L]

And inside my yii configuration file these rules




'rules' => array(                                                                                                                                                     	

                '<state:([a-z-]+)>/<city:([a-z-]+)>' => 'site/index',

                '<state:([a-z-]+)>' => 'site/index',

                '' => 'site/index',

),

So, like that, should Yii make some parsing or even try it? The only purpose i want yii rules it’s for creating urls.

Am i preventing Yii for walking over those rules and parse each one?

Thanks :)