I wish to modify all of the old Web addresses to some lately migrated Wordpress site. The alteration logic is a little complex, so I am considering a with a couple PHP script to complete the conditional regexp_replace within the URL.

The questions are :

  1. Is a poor strategy in comparison to htaccess 301 redirect, from Search engine optimization and efficiency perspective?
  2. Where would I add this (regexp replace code) within the index.php of Wordpress?

As lengthy because the old page returns a 301 within the mind together with the excellence of in which the page lives now it does not really matter which way you generate your 301 response.

Should you just relabel all of the old pages you'll lose whatever you Search engine optimization of individuals pages.

Re point 1, it is dependent on the amount of rules. Take into account that, by having an htaccess-based solution, the redirect rules are applied regardless of whether they are needed or otherwise.

Re point 2, you will find redirect plug ins for your: