I'm trying to set HTTPS on xF and WP. I have two SSL certificates registered.
xF is main domain
domain.com
WP is on subdomain
wp.domain.com
xF is in a subfolder on the WP install.
I tried adding a redirect in the root htaccess, but it must have wrong.
Can I use this in root htaccess? I have no idea what this means or does, I would replace www.domain.com with my domain. Do I put subdomain somewhere?
"
RewriteEngine On
# for subdomains
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.|)(.*)$ [NC]
RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L]
# for main domains
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R,L]
"
xF is main domain
domain.com
WP is on subdomain
wp.domain.com
xF is in a subfolder on the WP install.
I tried adding a redirect in the root htaccess, but it must have wrong.
Can I use this in root htaccess? I have no idea what this means or does, I would replace www.domain.com with my domain. Do I put subdomain somewhere?
"
RewriteEngine On
# for subdomains
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.|)(.*)$ [NC]
RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L]
# for main domains
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R,L]
"