2017-07-14 136 views
0

我有一個WordPress網站,它在HTTPS上打開很糟糕。WordPress網站在HTTPS上加載不好。

如果有人使用HTTPS打開,我希望它重定向到HTTP。

試圖把婁代碼在.htaccess文件 -

RewriteCond %{HTTPS} on 
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]???? 

但它打破了現場給錯誤500多個部分。

我現在的.htaccess文件是 -

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule . /index.php [L] 
</IfModule> 

# END WordPress 

請幫幫忙,任何幫助,將不勝感激。

+0

?如果您有TLS證書並且不需要HTTPS,請取消證書 – Kai

+0

它會打開但不會加載任何內容。我想將https鏈接重定向到http,300重定向。 –

+0

順便說一句,我正在使用cloudflare。尚未安裝任何TLS證書。 –

回答

1

隨着CloudFlare的,使用(前其他規則):

RewriteEngine on 
RewriteCond %{HTTP:CF-Visitor} '"scheme":"https"' 
RewriteRule^http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

或者你當你說「打開厲害」,你是什麼意思還可以添加Clouflare頁面規則(CloudFlare的網站)