I’m trying to integrate Slim 3 with a WordPress website, where I’m essentially running Slim before/in front of the main website (using the auto_prepend_file rule in the .htaccess file to execute Slim before WP is loaded).
Whenever a WP page is requested, I would like to run some tests in Slim and if the tests pass, silently go away and allow the WP application to process as usual. For some routes such as /api/*, I would like to have slim take over and function as normal.
The problem seems to be that if a route is not matched, a 404 page is shown and that automatically halts the request.
Is there any way to instruct Slim 3 not to halt the page execution is a route is not found? I tried to follow the answers on this post for Slim 2 but not able to make much progress with Slim 3.
Any help would be much appreciated.