Ensure that we always have two capture groups in nginx redirect regex expressions Closes #6144 See merge request !1468