views:

20

answers:

2

Hi guys, 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.

A: 

Why is the url in $redirect? Does the url match the exact certificate?

Lizard
It's a facebook redirect, and the URL is being generated by the getLoginUrl() method.
A: 

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');
mplungjan
Thanx, will give it a try!