Forum Moderators: open
I can't tell you the exact code at the moment, but I'll see if I can find the last one I did and post it for you.
You can check the redirects using #*$!, or the a firefox extension that shows the actual page headers being delivered to the browser once you are done.