I am redesigning my site and changing my domain and server. The new site will have a different file structure. What is the best way to redirect each page? I don’t want to keep my old server so would rather redirect from my domain registrar if possible.
Is this another WP redirection? I ask that because you’re putting the “file handler” in the middle of the path which is, in general, not a good thing to be doing.
From your single example, use the following code in the OLDdomain’s DocumentRoot (.htaccess):
RewriteEngine on
RewriteCond %{QUERY_STRING} ^p=([a-z])$
RewriteRule ^([a-z]+)/index\.php$ http://www.NEWdomain.com/index.php/$1/%1 [R=301,L]
The tutorial that’s been around SitePoint for years and helped many, many members can show you how to generate mod_rewrite code and offers many examples with explanations.