I've got a site with web addresses mysite.com/?p=605, I would like any Web addresses that contains /?p=123 to become rewritten to mysite.com/remap.php?page_id=123 having a 301. Can anybody give a simply rewrite with this please?

Thanks ahead of time for the help.

John

RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} ^p\=([0-9]+)$
RewriteRule ^$ /remap.php?page_id=%1 [R=301,L]

should work