By default the page is set like this in the Application module.config array:
Application
\'template_map\' => array( \'error/404\' => __DIR__ . \'/
You should first detach default notfoundstrategy and in your Module.php and in case of a 404, you should return a new viewmodel from the controller. Please see this post: http://www.cagataygurturk.com/zf2-controller-specific-not-found-page/