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.

All other Modules /

Discuss all other Modules here.

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

Director::redirectBack() url


Go to End


3 Posts   3405 Views

Avatar
malinux

Community Member, 23 Posts

16 September 2009 at 5:52pm

Edited: 16/09/2009 6:12pm

Hi

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

Avatar
malinux

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"]

Avatar
UncleCheese

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.