douleng0794 2010-07-05 00:12 采纳率: 0%
浏览 47
已采纳

PHP / Javascript iFrame重定向SSL错误

I have a problem with a redirect I am trying to do from within a iframe, I keep getting a SSL certificate error, is there a specific way should be redirecting from within an iframe? I am usig this code,

echo "<script type='text/javascript'>top.location.href = '$redirect';</script>";

I have also tried a standard PHP header redirect, but that doesn't work either.

  • 写回答

2条回答 默认 最新

  • doubengshao8872 2010-07-05 00:30
    关注

    Alternatively try

    window.open('$redirect','_top');
    

    It looks like you are going to break the back button too. I would do

    top.location.replace('$redirect');
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部