Ok php has to be on top for redirect to work