Rewrite rule for incoming urls

This solved both parts:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^archives/(.*)$ /\?p=$1 [R=301,L,QSA]
</IfModule>

The QSA flag maintained the query string automagically.

Most importantly, I had to put it above the existing WordPress rewrite rules in order for it to work.