Automatically redirect http to https when SSL enabled.