WordPress 404 messing up my root domain’s 404
-
Hello guys,
I’ve looked through the forums, but so far I’ve yet to come across a solution! It may be lying around somewhere, but somehow eluded me. ?? Lemme’ describe my problem!
My domain is https://brendalogy.net and my WordPress installation is in https://blog.brendalogy.net (or https://brendalogy.net/blog)
My WordPress already has a working 404 error page (thanks to the 404.php in my theme), which is awesome.
However, I want to define a static 404 error page for my root domain and its other subdomains, and limit the WordPress 404 error page to just my blog.brendalogy.net subdomain only.
I’ve tried creating .htaccess file for a custom static 404 error page in order to do so. However, all 404s from my root domain and other subdomains (e.g. https://www.brendalogy.net/lala.html or https://captured.brendalogy.net/wah/) led to a page with my WordPress theme (but no content).
Here is the .htaccess code in my root domain:
ErrorDocument 404 https://www.brendalogy.net
Here’s the .htaccess code in my WordPress subdomain/directory:
<IfModule mod_rewrite.c> ErrorDocument 404 https://blog.brendalogy.net/index.php?error=404 RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
Meanwhile, I’ve deactivated everything so my root domain and non-Wordpress subdomains show up my webhost’s default 404 error page for nonexisting pages.
How do I resolve this 404 problem?
Many thanks in advance! (:
- The topic ‘WordPress 404 messing up my root domain’s 404’ is closed to new replies.