Unless you've set DOMAIN as a constant somewhere else, it's not going to
redirect anywhere. Since you said this is at the top of your code, I
suspect this is the case.
To confirm this, replace that final
header() call with a
echo() (output to browser) or
(output to your web server log file) instead. This will show you where it's
trying to redirect you; I think it won't be a valid URL.