Hey @wecreateyou, I’m glad it’s helpful. There’s no variable parsing done prior to redirecting the user on to their destination, so that wouldn’t work. Sorry about that! You could try redirecting everyone to a special intermediate template I suppose, one that did some tag or PHP magic to parse the member ID and send them along.
@boosh: sorry for the late reply. Are you still having trouble with this? We use the htaccess/no-index-php setup on all of our site, so it’s likely not a problem with that bit. Can you tell me a little more about your setup? (EE version, type of webserver, default template group, which template is set as home page?)
I am having the opposite problem from boosh, which is most likely due to this setup, in that we do have index.php in all our URLs but instead of redirecting to index.php/account it is redirecting to /account which is breaking things. Ist there anything I can tweak in the extension, or should I try to remove the index.php from our URLs?
It worked fine by specifying “index.php/admin” in the settings, but I want to redirect to different pages for two different member types so need to specify in the return attribute on the login_form tag.
Thanks, Diarmid
I’m having the same issue as boosh - on devot:ee (devot-ee.com). If a user goes to the login page from the homepage it seems that the URL ends up being “http://devot-ee.com/index”, which throws an error.
To recreate (don’t use the small login link at the top - it works if you login from there, probably because you’re not coming from a login page): 1) Visit http://devot-ee.com 2) Visit http://devot-ee.com/members/login/ and login 3) See the “/index” error.
Looks like the default setting for login_destination is “site/index”. Of course, if I manually enter “http://devot-ee.com/site/index” in the URL (though not ideal), it works fine. I have strict URL’s enabled, if that helps.
I want to go to the last page visited. Is there a way to determine if the last page visited was the homepage, and just lop off any and all segments, or to make sire “site” gets added to the URL as well as “index”?
@mdesign
I am about to use this extension and I was wondering if you are finding any issues with the lg .htaccess extension? Or the User module by Solspace?
Thanks
@mdesign I have encountered the same issue but in my situation I was able to solve it with
../template_nameto back into the directory I wanted and eliminating the index in the url.
Your situation might be more complex or even more different than I imagine?
😉
Working on a site where this extension has proven to be quite helpful for the user experience. There were a few shortcomings that I came across so I’m just including some changes I made in case someone else finds it helpful.
To fix the “index” issue mentioned above, at least in my situation, by putting a simple conditional into the extension.
Find the first line below and just add the second line. In the v1.1.0 extension file it’s on line 161.
$url = $SESS->tracker['2'];
if ($url == 'index') { $url = '/'; }It was also pretty straightforward to enable “after logout, go to the previous page” functionality by adding another setting.
I added a line to the settings() function in the extension file.
$settings["logout_lastpage_destination"] = array( "s", array( "no" => "Specific Page (below)", "yes" => "Last Page Visited" ), "yes" );Then I added the appropriate line to the language file.
,'logout_lastpage_destination' => '<strong>Logout:</strong> After logout, go where?'And finally I added the following code to the process_logout() function
//Check if 'logout last page' is set to yes
if ($this->settings['logout_lastpage_destination'] == "yes")
{
$url = $_SERVER['HTTP_REFERER'];
}
else
{
$url = $this->settings["logout_destination"];
}Those two quick changes made this function much more useful for me.
We’ve released an updated version of the Redirect After Login extension. Please let us know if there are any problems.
In v 1.2.0 - January 13, 2010 you’ll find:
~ Added ‘Last Page’ handling for logout (thanks to Noah Kuhn) ~ Added fix for error related to visiting home, then login page (thanks to Noah Kuhn) ~ Cleanup of code formatting in extension file.
It’s available on project page (same URL) here:
http://www.twomile.com/services/add-on/expression-engine-redirect-after-login
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.