dsdqpdjpq16640651 2009-02-08 17:56
浏览 59

重定向后,超链接在firefox中停止工作?

On a project I'm working on, I am using HTTP headers to redirect the user to the frontpage after a successful login;

header("Location: http://example.com/index.php?");
exit(0);

EDIT: Added questionmark to url to show the problem

This works fine in all browsers tested - however, in Firefox 3.0.6, both on windows, mac and debian, it fails to set the hyperlinks properly. Every single hyperlink points to the same URL the redirect points to, completely ignoring the "href" attribute. Refreshing the page does not help - I have to re-enter the URL manually and hit enter for the hyperlinks to start working again.

I've tried this in IE6, IE7, Opera and Safari, and it works fine. I'm assuming something is wrong with the way I implement the redirect, could anyone point me in the right direction?

  • 写回答

1条回答 默认 最新

  • dt56449492 2009-02-08 18:57
    关注

    The solution seems to be this: I cannot redirect to a url ending with a questionmark, if I do, this problem will occur. It would seem to me this is not expected behavior from FF3, but I don't know the HTTP-spec's well enough to say if that's the case.

    Either way, problem solved by removing question-mark from redirect url.

    评论

报告相同问题?

悬赏问题

  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?