views:

20

answers:

1

I'm looking for some general guidance as to how to return a user back to the original page they were viewing after trying to log-in.

The way I have the site setup now is that if a user visits the Store page, for example, and then clicks the login button in the upper right, the user is returned to the default landing page.

Any help would be greatly appreciated!

+1  A: 

There are two ways how to do it:

  • either pass the current url as a param to the login link
  • or check the request object for the referrer and if it's from your own site redirect back
Jakub Hampl