*Note: i had to put some of the URL examples in php tags because the messageboard was parsing out important info
I'm trying to use header ("Location: $myurl") to redirect to a particular page, something I've done many times before without problems. However, I was trying to append an anchor (#123, for instance) to the URL, and noticed a rather strange issue:
in "anchors.php":
header("Location: [url]http://path/to/test.php?test=1#123[/url]");
This redirects to test.php?test=1#123 successfully, or so it would seem by looking at the url in the Location: bar in the browser. However, it doesn't go to the anchor, and right clicking on the page and selecting properties tells me the url is:
[mydomain]/test.php?test=1𞃳
notice how the anchor is repeated twice. I have tried different ways of getting around this, for instance
test.php#123?test=1, test.php?test=1{, test.php?test=1##123
but to no avail. I'm not sure if there's something I don't know about anchor parsing or if this is a legitimate bug.
I am running PHP 4.2.3 on FreeBSD 4.7
-Jim Keller
http://www.centerfuse.net