[英]YII. Redirect from https to http
我正在嘗試使用一種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]
但這沒有幫助。 我該怎么辦?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.