Forum Moderators: phranque
When I put this .htaccess file in the root directory of my "redirecting" site if the requested page or file is not in that directory or subdirectory, I still get a 404 error.
Does anyone have a fix?
Should I set up a 404 redirect?
Welcome to WebmasterWorld [webmasterworld.com]!
It's not clear what you intend to accomplish with this code, but its intent is to redirect multiple domains hosted in one account to a single 'preferred' domain hosted in that same account.
If a page within any of those domains does not exist, you will get a 404 error, and the posted code will not change that behaviour. If you want to do something special with missing pages, then you can declare an ErrorDocument for 404 errors, or use mod_rewrite itself to detect missing pages if you need special error handling depending on the requested domain.
Jim