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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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


Community Member, 1 Post

19 December 2010 at 5:54am


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


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.