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   1030 Views

Avatar
janieblue

Community Member, 1 Post

19 December 2010 at 5:54am

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

Community Member, 288 Posts

21 December 2010 at 1:05am

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.