Redirecting anonymous user to specific page I have a view (d7, views3) that is set up as a table with several fields and the far right column is a global custom text field containing some html like this in the text box:

&lt;a href="/[title]"&gt;Enroll&lt;/a&gt;


When an anonymous user comes to that page and clicks on that link, it forces them to the login page.  But then after they log in, it takes them to their main user page instead of the node that they would have gone to if they had been logged in.  Is there a way to send the user to the page they should have gone to after login ??
you can set destination after login to which you want the user to redirect to.

So consider this example a login link like  www.sitename.com/login?destination=node/1 will take user to node/1 after login.

More detail: 

https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_get_destination/7

one of you comment says you are using login redirect module, I have not used this module before the module page on drupal.org itself says it covers the functionality you are looking for.


  A simple module providing a method to redirect users according to an
  URL-defined parameter after logging in. Allows redirects toward
  non-Drupal location.


So the reason the that ?destination is not working, might be because of you a redirect rule triggered by login redirect module.

So solution can be set conditional redirection in login redirect module which can be checked using the parameters in url.