I found that by removing the WordPress section from the .htaccess in the main website root, both main website custom 404 and WordPress custom 404 functionality appear to work correctly. Is there any reason why I shouldn’t do this?
Yes, this is what I was going to suggest.
If WordPress is installed in the subdirectory /blog
and is accessed by the URL /blog/
then there is no need for the WordPress .htaccess
file in the document root. You certainly shouldn’t have both.
However, the “WordPress” .htaccess
file in the document root would seem to be rewriting to /index.php
in the document root, which is incorrect anyway?!
Is the addition of a WordPress section to the root .htaccess by the Installatron WordPress installer incorrect behaviour for a subdirectory installation?
Well, you would need an .htaccess
file in the root if you installed WordPress in the /blog
subdirectory, but the /blog
subdirectory was hidden from the URL-path. (It would, however, be written differently to the current .htaccess
file in root. In fact, it would be the same as the .htaccess
file currently in the /blog
subdirectory.)