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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Redirects in Silverstripe


Go to End


2 Posts   1423 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.