Firefox:
http://example.com/about/#anchor -> http://www.example.com/about/#anchor
Internet Explorer 6-8:
http://example.com/about/#anchor -> http://www.example.com/about/
Why is the anchor dropped in IE and what can I do about it? (Query string is not dropped, only the #xyz part)
Is a PHP header or javascript redirect my only option? Thanks for all hints.
Update: Seems as the hash is not sent to the server. Would combining a PHP 301 header and a javascript redirect (with the location.hash) be a good solution?
Had a similar problem in Tomcat/JSP, don't know about PHP. In Tomcat the rule was that the #anchor is only intended for the browser/user agent so you can't get it. My workaround was to use Javascript in the page instead to achieve the redirect. My tip would be that if you can't get it working in PHP soon then start trying a Javascript workaround.
Anchors are never sent to the server, so no server-side solution can retain them.
Only server side anchors can be used durring a server side redirect. They must have an ID (although I am not sure if they have to be created programatically)
Alternately you can pass a parameter and use the onload to move the focus to the ID or hyperlink.