|
|
@ -167,12 +167,12 @@ class Controller extends \yii\base\Controller |
|
|
|
* Any relative URL will be converted into an absolute one by prepending it with the host info |
|
|
|
* Any relative URL will be converted into an absolute one by prepending it with the host info |
|
|
|
* of the current request. |
|
|
|
* of the current request. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param integer $statusCode the HTTP status code. If null, it will use 302. |
|
|
|
* @param integer $statusCode the HTTP status code. Defaults to 302. |
|
|
|
* See [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html]] |
|
|
|
* See [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html]] |
|
|
|
* for details about HTTP status code |
|
|
|
* for details about HTTP status code |
|
|
|
* @return Response the current response object |
|
|
|
* @return Response the current response object |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function redirect($url, $statusCode = null) |
|
|
|
public function redirect($url, $statusCode = 302) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return Yii::$app->getResponse()->redirect(Html::url($url), $statusCode); |
|
|
|
return Yii::$app->getResponse()->redirect(Html::url($url), $statusCode); |
|
|
|
} |
|
|
|
} |
|
|
|