www.miinik.com - domain
www.jingjingna.com - subdomain
I have tried most of the htaccess code to force SSL, but it keep causing a redirect loop. So I got this code from the internet applied it through plugin, WOW! it is now working perfectly... for miinik.com. Sadly, I log into jingjingna.com and now all the setting from miinik.com applied it to jingjingna.com(it suppose to be a completely different site). The problem could be from the php code or htaccess(miinik.com) *PS I have not edit jingjingna htaccess
<?php
if (stripos(get_option('siteurl'), 'https://') === 0) {
$_SERVER['HTTPS'] = 'on';
// add JavaScript detection of page protocol, and pray!
add_action('wp_print_scripts', 'force_ssl_url_scheme_script');
}
function force_ssl_url_scheme_script() {
?>
<script>
if (document.location.protocol != "https:") {
document.location = document.URL.replace(/^http:/i, "https:");
}
</script>
<?php
}
---------------------miinik htaccess------------------------------
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
</div>