Return value in login_form not working

expressionengine

Solution

I finally figured it out.

Apparently I was still using a small plugin called "Twomile Login Redirect" which hijacked my login code ( even when it was disabled, I had to remove it )

So all is well now.

Lesson learned: remove old plugins :)

Problem

I have a login form at the following page: site.com/en/downloads “en” is the user_language ( and is stored as such in a global var ) when I login, the form redirects me to: site.com/downloads While it should redirect me to the URL with my user_language I’ve tried numerous things, but the value of the return value always gets ignored. - return =”{site_url}/{user_language}/downloads” - return =”{site_url}” - return =“http://site.com” - return =“http://google.com” - return =“about/index” they all redirect to site.com/downloads. the code that is being outputted ( for the last example ) looks like this: ``` <form method="post" action="http://site.com/" > <div class='hiddenFields'> <input type="hidden" name="XID" value="9fae3b1b5fcf882776da6638706595af73a7b15d" /> <input type="hidden" name="ACT" value="7" /> <input type="hidden" name="RET" value="about/index" /> <input type="hidden" name="site_id" value="1" /> </div> ``` I have an .htaccess that looks like this: ``` RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L] ``` UPDATE: I tried using freemember as suggested, but the problem remains the same: I've set the return value to "about/index", but I'm still being redirected to site.com/downloads. The code generated by freemember looks solid though, so something must be overriding the return value. ``` <form method="post" action="http://site.com/downloads" > <div class='hiddenFields'> <input type="hidden" name="XID" value="d9483688fbf63d9ea47e89a66e074b99f5b8465c" /> <input type="hidden" name="ACT" value="18" /> <input type="hidden" name="_params" value="wvkEsN96mPfmlhgerM2ppxGbMmiLJrz0Ntn7apKer/rmBpQaUozvSM0TvkVN66QlX/ptCM1IQGsuZuw7X3mzlOMCFIUyYFpbZy5h7nfPJMiHLdpqXqwBFOiA/zcNW0GKAIicv4JPAS2mfHKQE+mb2Ct0L+jhGz0NlSdELuMOeqQPJJ3B7U90D5w/sKTeaX5zaOMSvKJ4LZ7xP0Dn+UxE9g==" /> <input type="hidden" name="return_url" value="about/index" /> <input type="hidden" name="site_id" value="1" /> </div> ```

Original source