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:

All other Modules /

Discuss all other Modules here.

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

Director::redirectBack() url

Go to End

3 Posts   3034 Views


Community Member, 23 Posts

16 September 2009 at 5:52pm

Edited: 16/09/2009 6:12pm


I'm writing a little module and wan't get the url as a string similar to the url that Director::redirectBack() would redirect me to. I wan't to save this url in a session for later use. Is that possible some how?

- Martin


Community Member, 23 Posts

17 September 2009 at 9:58am

Don't know if it is the best solution but I ended up using $_SERVER["HTTP_REFERER"]


Forum Moderator, 4102 Posts

17 September 2009 at 11:12am

Yeah, it's not that reliable, but that should do. Really the only way to get that information is through Javascript with access to the browser history directly.