1

I have a site with WordPress located in a directory under the root. The root directory contains the main files for the non-WordPress part of the site. Wordpress is included in all of these pages by inclusion of wp-load.php and this is working fine.

My question is about how best to handle 404 errors generated in this external part of the site. I'd like to have a single 404 page and ideally to use the WP 404 page for this purpose.

Is this possible and does anyone know how it could be accomplished?

1 Answer 1

2

Set the WordPress index.php as error handler in your .htaccess (if you are using Apache):

ErrorDocument 404 /wp/index.php

Make sure the path matches the path to the WordPress directory.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.