url management adding rules

Hi,

I would like to add rule into url manager. It works fine but I can’t get the $1 and $2 values. Any idea ?




<?php

class UrlManager extends CUrlManager {

    protected function processRules(){

	$this->rules['home']='resellersite/index';

	$this->rules['signup']='resellersite/signup';

	$this->rules["^(login)/([a-zA-Z0-9\-_.|]+)/([a-zA-Z0-9\-_.|]+)"]="resellersite/customerLogin/$1/$2";

		

		parent::processRules();

	}

}

?>



Why are you adding rules there and not in the Application configuration? :S

There is no need to extend CUrlManager to define your own rules, you define them in protected/config/main.php see here http://www.yiiframework.com/doc/guide/1.1/en/topics.url#user-friendly-urls

I have more staff to go into rule from database. I just clean up before i add into forum. I have content management and use clear url for reseller to enter their url info and i add them to rule. So I have to use another class.

Actually what i want is once the customer come with

mywebsite.com/login/requesteditem/computer

i want to direct page to

resellersite/customerLogin page with parameter requesteditem=>computer

any idea how can I do as a rule this one ?

thanks all problem solved

i just add




$this->rules['login/*']='resellersite/customerLogin';