How to intercept POST/GET data?

I am trying very simple case as noted below but I am not getting data as expected. What is that I am missing? Thnaks

URL:

http://localhost/authn.html?broker=data1&token=data2

Controller:




class authnController extends GServerController {

    public $defaultAction='authn';


    public function __construct() {

        parent::__construct();

        $this->layout='none'; 

    }


    public function actionAuthn() {

        echo "<pre>"; 

        print_r($_GET);

        print_r($_REQUEST);

        print_r($_POST);

}

}



Output I get:

Array

(

[r] =&gt; authn.html

)

Array

(

[r] =&gt; authn.html


[PHPSESSID] =&gt; irh2n4mc6dhn0f0k0v1ridn740

)

Array

(

)

This looks very similar to a problem I had recently, caused by my apache rewrite rules. See if this helps:

Link


var_dump(Yii::app()->request);

It works with:

RewriteRule ^.*$ index.php [NC,L]