help to redirect if headers not sent already