You'll have to adjust
this line in
includes/mcp/mcp_queue.php
.
(This is phpBB 3.2 GitHub pages, but should still be pretty much the same for 3.1.4)
I guess something like
append_sid("{$phpbb_root_path}mcp.{$phpEx}", "i={$id}&mode={$mode}");
could do the trick.
NOTE: I haven't tested this and wrote it on the fly. Nor looked into where else the
$redirect
variable, set on this line, is used.
So first test it on a local test board and see how it affects your board.