http://www.perlmonks.org?node_id=80025


in reply to Smart Forwarding Script upon 404

in the simplest case, all you need is an .htaccess file:

redirect / http://www.newdomain.com/

which seems like a strong argument for not changing the addresses, to me. failing that, have a look at http://www.apache.org/DELETE_ME/custom-error.html.