Problem with change header location

This seems to be a classic issue with UTF-8 BOM. WordPress loads a theme template file that contains a BOM which causes PHP to send it as body - together with the HTTP response headers that can’t be changed anymore afterwards.