0

我正在尝试使用其中一个 API,因此它们会发送类似 https://domain.com/controller/action的响应, 但该页面返回 500 错误。

我试过用这个

class HttpFilter extends CFilter {
    protected function preFilter( $filterChain ) {
        if ( Yii::app()->getRequest()->isSecureConnection ) {
            # Redirect to the secure version of the page.
            $url = 'http://' .
                Yii::app()->getRequest()->serverName .
                Yii::app()->getRequest()->requestUri;
            Yii::app()->request->redirect($url);
            return false;
        }
        return true;
    }
}

和这个

RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} ^/charge/chargePrivatResult$ [NC]
RewriteRule ^(.*)$ https://domain.com/$1 [L,R=301]

但这没有帮助。我应该怎么办?

4

1 回答 1

0

看看这个。。很好用。。

http://www.yiiframework.com/wiki/407/url-management-for-websites-with-secure-and-nonsecure-pages/

于 2014-08-12T15:37:32.507 回答