Extended redirects to include redirect code (and parameters).

Merging an old improvement branch (to clean up branches).