2016-03-26, 10:08 AM
I'm trying to force https://www. in front of my url.
My .htaccess in the root directory looks like this
This works, it forces https://www. in front of the URL but when you load up the site it either say's
"To many redirects", Or some hosting error page from cloudflare and when I visit a sub domain like
domain.com/forums it only forces the www. not https://www.
I have tried many variations of this .htaccess code but the all have the same or some other errors
Regards,
Finn
Uff, I fixed it now, I just added a page rule rule in cloudflare and removed the .htaccess code,
If anyone is having the same problem while using cloudflare read this
https://support.cloudflare.com/hc/en-us/...-HTTPS-SSL-
My .htaccess in the root directory looks like this
RewriteEngine On
# for subdomains
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(www\.)?amethystcheats\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.|)(.*)$ [NC]
RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L]
# for main domains
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^amethystcheats\.com$ [NC]
RewriteRule ^.*$ https://www.amethystcheats.com%{REQUEST_URI} [R,L]
This works, it forces https://www. in front of the URL but when you load up the site it either say's
"To many redirects", Or some hosting error page from cloudflare and when I visit a sub domain like
domain.com/forums it only forces the www. not https://www.
I have tried many variations of this .htaccess code but the all have the same or some other errors
Regards,
Finn
Uff, I fixed it now, I just added a page rule rule in cloudflare and removed the .htaccess code,
If anyone is having the same problem while using cloudflare read this
https://support.cloudflare.com/hc/en-us/...-HTTPS-SSL-