Jump to:

10843 Posts in 2514 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Director::redirectBack() url

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 2406 Views
  • malinux
    Avatar
    Community Member
    23 Posts

    Director::redirectBack() url Link to this post

    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

  • malinux
    Avatar
    Community Member
    23 Posts

    Re: Director::redirectBack() url Link to this post

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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Director::redirectBack() url Link to this post

    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.

    2406 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.