g1smd - 1:22 pm on Jul 16, 2010 (gmt 0) [edited by: g1smd at 1:25 pm (utc) on Jul 16, 2010]
Change "internal redirect" in your comment to be "internal rewrite".
Change "301" in your comment to "external 301 redirect".
Add the domain name to the redirect target.
All the [L] flag to the rewrite. All rules usually need the [L] flag.
List the redirect code before the rewrite code.
Add your canonical non-www to www redirect code after the parameter redirect code, and before the internal rewrite code.
[edited by: g1smd at 1:25 pm (utc) on Jul 16, 2010]