Logging in to leave comment breaks redirect


1) I am on a domain mapped blog, and wish to a leave a comment on a post.

2) I select the link to login in order to leave a comment. The link has the following structure: http://domainmapped.com/wp-login.php?redirect_to=http://domainmapped.com/post/ but it takes me to http://originaldomain.com/wp-login.php?redirect_to=http://domainmapped.com/post/

3) After I enter my credentials to login and submit the form, the login form reloads, this time with the URL https://originaldomain.com/wp-login.php?redirect_to=https://originaldomain.com/wp-admin/

(notice the https:// that appears)

4) After a second login I am sent to the admin backend, instead of to the post.

Some notes:

In my wp-config I have:

define(‘FORCE_SSL_LOGIN’, true);

If I disable that then step 3 never happens (I dont have to login a second time) but I am still redirected to wp-admin instead of back to the post to leave a comment.

Interestingly, if I ADD:

define(‘FORCE_SSL_ADMIN’, true);

..while maintaing FORCE_SLL_LOGIN, I also skip step 3.

So having both SSL config options enabled result in a single login, but I dont get redirected to the post. And really, I should be using these two options, so that’s fine. The question then is, why wont domain-mapped sites redirect after a successful login.

This behavior does not happen to non-domain mapped sites. They redirect me back to the post after logging in to leave a comment.