Forum Moderators: phranque
[codes]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Redirect 301 / [localhost...]
</IfModule>
[/codes]
Do not redirect to this target page, as this would confuse search engines -- they would receive a 301 redirect followed by a 200-OK response, and therefore think that the page existed but had moved. And by redirecting *all* non-existent URLs to a single page, you would create "infinite duplicate content" -- not good for your search rankings. (Search our Google forum for "duplicate content" to read previous tales of woe.)
See Apache core, ErrorDocument directive, and read very, very carefully, as a single mistake here could be quite costly to you.
Jim