You installed Mediawiki some time ago, and now something bothers you: aren’t you tired of having an intermediate page named “Login successful” saying “You are now logged in to” before being allowed to go to the page you wanted to go? I am.
I found there’s a hook that is called just when a user successfully logs on (UserLoginComplete), and even an extension named RedirectOnLogin that does the redirection for you, BUT to a fixed one. It seems the hook doesn’t give you the page you previously were before the login request.
So to correct this, I just found a dirty hack. That means you’ll have to patch the source, meaning also that you’ll loose some flexibility when upgrading Mediawiki :-(
Anyway, if you still want to do this, here is the magic stuff:
Edit the file mediawiki/includes/specials/SpecialUserlogin.php and look for the function successfulLogin().
At the end of it, just add (it’s just one line):
header('Location: ./index.php?title=' . $this->mReturnTo);
That’s it. You’ll get redirected to the previously accessed page automatically! Really cool.
This has been successfully used on a Mediawiki 1.13.