Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Redirects in Silverstripe


Reply

2 Posts   1007 Views

Avatar
janieblue

19 December 2010 at 5:54am Community Member, 1 Post

Hello,

I am trying to build a Faceboop app in Silverstripe. The problem is that pages redirect with Header("Location: xxxx"); I get a redirect loop in FB, because a FB app is in a iframe and redirects need to be sent to _top. To do this I would need to redirect with javascript: top.location.href = 'xxx'; I see that all redirects in Silverstripe are heandled in SS_HTTPResponse in the core of the Sapphire.
What would be the most elegant solution for me to implement the redirect to target "_top" problem?

kind regards, Jana

Avatar
MarcusDalgren

21 December 2010 at 1:05am Community Member, 288 Posts

Could you perhaps explain abit more about why you end up in a redirect loop?
If you're looking to redirect in PHP then you have Director::redirect() for that.