Originally Posted by Aziz
the 404.php in a wordpress theme somehow overrides the .htaccess code
I think that depends upon the order of the code in .htaccess.
If one uses the default for .htaccess in wordpress, the 404.php does come to the front.
But a lot of themes for wordpress do not include a 404.php.
Instead letting wordpress do that duty.