Redirect www to www, non www to non www, and aways https to http

hello i want to my user when it connect to my website subdomain using http://www.subdomain.com
that it stay in this link

and if it go from https it always go to http

but if it goes with http://subdomain.com it also stay in this link

i used this on htaccess on my server it works for the first case

but when i redirect the dns to clouldflares it dont work anymore…

RewriteEngine On
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

how can i create this redirects on clould flare i tried with the wizar but dint work

Hello,

i saw the tutorial and tried some but it didnt worked… i talked to the guy on mochahost and he say my dns didnt propagated yet… i will try later…

What is your domain name?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.