Not getting the 404 WordPress page
-
I just did a clean install of a multisite (network) using subdomains. Everything worked great, but I noticed that going to https://domain.com/anything.php would get me a generic “not found” page instead of the “WordPress 404” page. Also, when going to https://domain.com/wp-admins/ would return a 503 error. My htaccess is:
1. # add a trailing slash to /wp-admin 2. RewriteRule ^wp-admin$ wp-admin/ [R=301,L] 3. RewriteCond %{REQUEST_FILENAME} -f [OR] 4. RewriteCond %{REQUEST_FILENAME} -d 5. RewriteRule ^ - [L] 6. RewriteRule ^(wp-(content|admin|includes).*) $1 [L] 7. RewriteRule ^(.*\.php)$ $1 [L] 8. RewriteRule . index.php [L]
Removing lines 6 and 7 will eliminate the problem. After searching the forum I found that those lines are there (I think) to prevent a 503 error some people were reporting, but I think line 2 does the same thing (the redirect loop is caused by not having the trailing slash at the end).
I deleted those lines. I have been testing and found no problems, but I wonder if it is safe to simply remove them from my htaccess file. If anybody has experienced this or if there is something I am missing, please let me know so I put those lines back. Thanks!
- The topic ‘Not getting the 404 WordPress page’ is closed to new replies.