We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Extension: Redirect After Login (Twomile)

Development and Programming

Sean C. Smith's avatar
Sean C. Smith
3,818 posts
about 16 years ago
Sean C. Smith's avatar Sean C. Smith

I’m using v1.2.0 of this extension and having the page return to a non-existent url upon login. It works perfectly fine for logout however.

the site root is located at http://domain.com/foo/ where foo is the directory on the server where EE is installed.

If I’m at this location http://domain.com/foo/news/ and login I get taken to http://domain.com/news and see nothing as the page is non-existant and at that url outside of EE.

       
J. Hull's avatar
J. Hull
132 posts
15 years ago
J. Hull's avatar J. Hull

I need this to work in 2.0 pronto please!

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith
I’m using v1.2.0 of this extension and having the page return to a non-existent url upon login. It works perfectly fine for logout however. the site root is located at http://domain.com/foo/ where foo is the directory on the server where EE is installed. If I’m at this location http://domain.com/foo/news/ and login I get taken to http://domain.com/news and see nothing as the page is non-existant and at that url outside of EE.

still getting this error.

       
Corey Snipes's avatar
Corey Snipes
34 posts
15 years ago
Corey Snipes's avatar Corey Snipes

We’ve released an updated version of the Redirect After Login extension, freshly reworked for EE 2.0.

No features have changed; we just reorganized the extension a bit to work with EE 2.0 internals (esp. session handling). It has been lightly tested, but please consider this a beta release, and be attentive if you’re using this on live sites.

If you encounter any problems or odd behavior, please post here in the EE forum thread and we’ll take a look.

2.0 Version is here: http://www.twomile.com/services/add-on/redirect-after-login-for-expressionengine-20

1.6 Version is here: http://www.twomile.com/services/add-on/redirect-after-login-for-expressionengine-16

       
Corey Snipes's avatar
Corey Snipes
34 posts
15 years ago
Corey Snipes's avatar Corey Snipes

@createsean - We haven’t worked with this extension in a scenario where EE is installed in a subdirectory, but we’ll take a look. That sounds like something that wouldn’t be too tough to sort out.

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith

Corey,

excellent - looking forward to it.

       
deckard97's avatar
deckard97
137 posts
15 years ago
deckard97's avatar deckard97

Corey,

I’m using v.1.2.0 of your plugin and while it is set to Last page visited after login it “forgets” the index.php part of the URL it seems.

I’m using an

{exp:member:login_form return="inscription/edit_profil"}

tag at this URL for example:

http://domain.com/index.php/inscription/edit_profil/

and when I login I end up here:

http://domain.com/inscription/edit_profil/

instead.

Last page visited upon logout is working as expected.

       
Corey Snipes's avatar
Corey Snipes
34 posts
15 years ago
Corey Snipes's avatar Corey Snipes

Hey @deckard97, thanks for the feedback. We’ll check it out.

       
Dave Crooks's avatar
Dave Crooks
9 posts
15 years ago
Dave Crooks's avatar Dave Crooks

I’m using the latest version of your redirect extension and like the above user it is forgetting the index.php part of the url, which is fine for me because I took index.php out of my urls…

However, another weird thing that is happening is that when set to redirect to last visited page, after login I am taken literally to http://www.example.com. I’m not really sure why this happening.

[UPDATE]: Figured it (the example.com redirect) out and it was something unrelated sorry. The dropping of index.php is still present though.

Thought I would let you know.

       
Cog Design's avatar
Cog Design
10 posts
15 years ago
Cog Design's avatar Cog Design

Hi Corey,

I’ve installed your extension, and it looks fantastic. However, I’m unable to get the feature working on my install.

I’m using:

===== CP:

EE 1.6.7 + discussion forum 2.1.1 Twomile Login Redirect 1.2.0

I have set the following preferences:

Logout: Specific page - /index.php

Login: Last Page Visited

Template: <pre><code> {exp:member:login_form}

        <fieldset id="username_password">
            <div class="clearfix">
                <label for="username">Username</label>
                <input type="text" name="username" id="username" value="" maxlength="32" class="input" size="25" />
            </div>
            <div class="clearfix">
                <label for="password">Password</label>
                <input type="password" name="password"  id="password" value="" maxlength="32" class="input" size="25" />
            </div>

        {if auto_login}
            <div id="autoLogin">
                    <label for="auto_login"><input class='checkbox' type='checkbox' name="auto_login" id="auto_login" value='1' /><span class="optional_text">Auto-login on future visits</span></label>
            </div>
        {/if}
        </fieldset>

        <input id="login" type="submit" value="Login" />        


        <a href="http://{path=members/forgot_password}class=forgotPassword">Forgot your password?</a>

    {/exp:member:login_form}[/code]

(have removed redirect, in-case it conflicts

However, logging in and out, both go to the home page.

Any ideas on where I am going wrong?

Thanks,

Jack

       
Jim F's avatar
Jim F
53 posts
15 years ago
Jim F's avatar Jim F

EE 1.6.8 MSM Multiple site login.

Having a problem with the redirect on login as well. It leaves out the code trigger (index.php).

       
Cog Design's avatar
Cog Design
10 posts
15 years ago
Cog Design's avatar Cog Design

Hi Corey,

Managed to get my issue sorted, and it’s working great! However still experienced the same issue as Jim F (the ext. leaving out index.php) and had to modify the extension to include the index page.

Thanks,

Jack

       
porthos's avatar
porthos
55 posts
15 years ago
porthos's avatar porthos

I’d love to use this extension with EE2 but I’ll have to wait until it works with subdirectories.

Keep up the great work.

       
e-man's avatar
e-man
1,816 posts
15 years ago
e-man's avatar e-man

This solved on my major headaches recently when I couldn’t get return or override return to work on a login form. Many thanks!

       
James Likeness's avatar
James Likeness
10 posts
15 years ago
James Likeness's avatar James Likeness
Hi Corey, Managed to get my issue sorted, and it’s working great! However still experienced the same issue as Jim F (the ext. leaving out index.php) and had to modify the extension to include the index page. Thanks, Jack

How exactly did you modify the extension to include the index page? My EE install is using “main” instead of “index.php”, and the extension is somehow losing the main/ section of my URLs. Is there somewhere in the extension where I can just add main/ and have it included in the redirect page?

EDIT: I should mention… the redirect works perfectly on a logout, but it forgets the /main/ when logging in.

EDIT 2: Ok, looks like I was able to hack a solution. For the time being, I’ve commented out the whole section of the extension that deals with the login process. To handle the login redirect, I’m just using this:

{exp:member:login_form return="{segment_1}/{segment_2}/{segment_3}/{segment_4}"}
       
First 3 4 5 6

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.