Redirect to https and http need help urgent


#1

hi,
im really facing an issue to redirect my domain to https and force a subdomain to http
i used page rules but every time im getting too many redirects so here is what i want exactly
redirect all to https:/ /example.com/ and folders
example redirect the root dmain and its all subfolders:
www.example.com
https:/ /www.example.com
http:/ /example.com

to https://example.com/

finally redirect the subdomain https:/ /m.example.com to http:/ /m.example.com/ and its subfolders

thanks


#2

If you don’t want your subdomain to use HTTPS, make sure you’ve disabled “Always Use HTTPS” and “Automatic HTTPS Rewrites” in the Crypto settings section of the Cloudflare dashboard.

I’m not clear on what else you’re trying to accomplish, but it sounds like you want some Page Rules:

  1. Match https://m.example.com/* and add Setting to URL Forward (301) to http://m.example.com/$1
  2. Match www.example.com/* and add Setting to URL Forward (301) to https://example.com/$1
  3. Match http://example.com/* and add Setting for SSL: Full (Strict) or whatever SSL setting you’ve been using.

#3

thank you so much its work but still have a little problem i follow all steps you mention but when test the url like http://example.com/chat/ its not redirect to https also when i test
https://example.com/chat/ it redirect to http


#4

Change Rule 3 to a Forwarding URL that redirects to https://example.com/$1

If you post the actual domain name, we can take a closer look.


#5

my domain is https://12allchat.me
here is my pages rules

i test the website via redirect-checker.org now the problem the chat folder always keep on http its not redirect to https


#6

Don’t forget to change Rule 3, as outlined a couple posts up. The SSL:Strict setting I suggested was a mistake.


#7

yes i try to change the rule 3 to https://example.com/$1 but as i said when a visitor try to login to the chat its says too many redirects and i already test it in online redirect checker the same result too many redirect


#8

Whatever you’re using for Chat looks like it’s trying to force you to use HTTP. You’ll have to check the URL configuration in that software and make sure it’s set for HTTPS.