header Location redirect with anchor tag and IE7

核能气质少年 提交于 2019-12-02 08:45:01

The Location header requires an absolute path per the HTTP specification. Try using an absolute path. The errata says that document fragments (#id) are allowed in the Location header, but the behaviour when a user is linked to a page with a fragment (e.g. http://example.org/a_redirector#this where a_redirector redirects to http://example.com/destination#that) is undefined.

Yes that is true. It can be prevented if you use an absolute path:

header("Location: http://www.example.com/page.php#images");
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!