Sorry, but I do know better than you.

Apache: Redirect 404′d Files to a Different Domain

March 6th, 2010
Tags:

I’ll spare you the rant on Google and the horrible advice and misconceptions spewed in forums about doing this, and just give you the good stuff:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*)$ http://TARGETDOMAIN/$1 [L]

Drop this sucker in, swap out ‘TARGETDOMAIN’ with where you want your 404′d files redirected to. Bah.