if (headers_sent()) return false;
else
{
Header (" Location: ".$to);
exit();
}
IIS is real picky about Header calls, and you may not be able to use this like in apache...
I also suggest you use output bufferring and if it still doesn't work our you can try outputting meta redirect tags instead...