I've looked and found different fixes for this. So I am going to combine all of the things I've found, into one post.
What my problem was: http://www.mysite.com produced the 404 page that I wanted displayed. BUT a site that is hosted for a client I have is at http://www.mysite.com/othersite and when a 404 page is requested for it the page it displayed with the MAIN site's 404 page.
What I did:
* I host my own blog using:
********************************************
* Apache 2.2.14 *
* PHP 5.2.12 *
* MySQL 5.1.39 *
* WordPress v.2.9.2 *
********************************************
This is assuming you have the same setup
********************************************
This is the structure that I have at work. (I don't use sub-domains.)
http://www.mysite.com <--- (this is the root)
http://www.mysite.com/othersite <--- (this is the "other" hosted site)
Each have there own wordpress install but use the same database, with different table prefixs:
EX: wp_ (for main site) wpsite2_ (for 2nd site)
In each install root I have a .htaccess file with this code:
This one is for the main site
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#404 Page
ErrorDocument 404 /404.html
# END WordPress
This one is for the 2nd site:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#404 Page
ErrorDocument 404 /othersite/404.html
# END WordPress
Make sure to have the ErrorDocument handler point to the location of each of your sites 404 page.
Now this is the lazy way to do it, but I find it effective. When you change a theme you might need to change and edit the page.
Lastly test out each page, by typing www.mysite.com/THISISATEST and test out your other site www.mysite.com/othersite/THISISATEST
NOTE
****
Make sure in your httpd.conf file you find and search for the instance of .htacess and edit:
AllowOverride None switch it to AllowOverride Off