The most common redirection error is a redirection loop.
- Does the script really end after your first example?
- Where does $host come from?
Also, SERVER_NAME is usually an apache configured global name, HTTP_HOST is really the right way to do this.
HTTP_HOST may contain the port number, keep this in mind.
So what's the url of your script, and where are you redirecting to?
A simple way to debug is to echo the contents of HTTP_HOST and instead of calling header(), also call 'echo'.
Evert
2010-10-07 09:32:56