Richard G
Verified User
Redirect to https and non-www to www except subdomains
I'm looking all over the internet, but nothing works like I want to, or with speed testers I get messages that I have to reduce redirects.
Most of what I found did not work or only worked half.
This is what I want to do:
1.) Redirect all http to https including subdomains.
2.) Redirect all http://domain.com to https://www.domain.com (so non-www to www)
3.) I do NOT want -any- subdomdain https://*(except www).domain.com to be redirected to https://www.*.domain.com
So I don't want http or https:/sub.domain.com redirected to https://www.sub.domain.com but only to https://sub.domain.com
Same for other subdomains.
If 3.) is not possible, I would like at least 1 subdomain from http to https without www but just as https://sub.domain.com.
I would like to do this in a .htaccess file in the best way possible (less redirects possible).
Please do not point to apache documentation, I've read that, I'm not English and I only get more confused.
I'm looking all over the internet, but nothing works like I want to, or with speed testers I get messages that I have to reduce redirects.
Most of what I found did not work or only worked half.
This is what I want to do:
1.) Redirect all http to https including subdomains.
2.) Redirect all http://domain.com to https://www.domain.com (so non-www to www)
3.) I do NOT want -any- subdomdain https://*(except www).domain.com to be redirected to https://www.*.domain.com
So I don't want http or https:/sub.domain.com redirected to https://www.sub.domain.com but only to https://sub.domain.com
Same for other subdomains.
If 3.) is not possible, I would like at least 1 subdomain from http to https without www but just as https://sub.domain.com.
I would like to do this in a .htaccess file in the best way possible (less redirects possible).
Please do not point to apache documentation, I've read that, I'm not English and I only get more confused.
Last edited: