Tested on my testsite and works just great, but on my live site using SSL / https then it always redirect back to original domain.
I did find the issue.. Several places the WWW was not cleaned out from domain and this caused a problem comparing domains and then a redirect to the old domain.
I added preg_replace( ‘/^www./i’, ”, $value ); around where needed and now everything works ok. Also fixed the hreflang $_SERVER[‘HTTPS’] ? ‘http://’ : ‘https://’;
So at my end it works perfect now.
Hi @metuza,
And where is it needed? 🙂
By the way
My main domain is https://www.meubles-en-merrain.fr
And I want https://www.oak-barrel-furniture.com to be my second domain
So I set this configuration: oak-barrel-furniture.com:443
but I get redirected to the main domain.
Do you know why?
I fixed the issue by adding this to the wp-config.php
define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
But my ressources are still set without https, so everything is broken.
Fixed.
I changed my root index.php with:
ob_start();
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
$output = ob_get_contents();
ob_end_clean();
$output = str_replace(array("https://", "http://"), "//", $output);
echo str_replace('http:\/\/', "\/\/", $output);
Hello! The latest version of the plugin (0.7) should fix the SSL issue. Please give it a try and report any issue.