here’s a trick to redirect user back to topic after login
I had not seen this posted before and I just (finally) figured it out so I thought I’d share.
If you’d like to give the user a friendly redirect back to the topic (or forum) they were at just before they logged in (instead of the front page) simply open the
login-form.phptemplate in your theme and add this BEFORE the final
<input type="hidden" name="re" value="<?php echo "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"].'?'.$_SERVER["QUERY_STRING"]; ?>" />
<input type="hidden" name="_wp_http_referer" value="<?php echo bb_get_option( 'uri' ) ?>" />
Should work on anything except maybe IIS.
The topic ‘here’s a trick to redirect user back to topic after login’ is closed to new replies.