Reputation: 77
I have a WordPress site and it opens badly on HTTPS.
I want it to redirect to HTTP if anyone opens using HTTPS.
Tried putting the bellow code in .htaccess file -
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]????
But it breaks the site to give error 500 on multiple sections.
My current .htaccess file is -
<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
Please help, Any help would be appreciated.
Upvotes: 0
Views: 37
Reputation: 18671
With Cloudflare, use (before others rules):
RewriteEngine on
RewriteCond %{HTTP:CF-Visitor} '"scheme":"https"'
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Or you also can add Clouflare page rule (Cloudflare web site)
Upvotes: 1