Title: exit404 function impacts website cohesion
Last modified: November 14, 2020

---

# exit404 function impacts website cohesion

 *  Resolved [madmax4ever](https://wordpress.org/support/users/madmax4ever/)
 * (@madmax4ever)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/exit404-function-impacts-website-cohesion/)
 * For dynamic images management, your exit404 function is great for debugging, 
   but maybe you should modify your function to:
 *     ```
       function exit404( $message ) {
       	global $wp_query;
       	$wp_query->set_404();
       	status_header(404);
       }
       ```
   
 * This way, you’ll redirect to the site global 404 management system and page.
   
   As a webmaster, I think it’s way better for the website and the brand image than
   a one line “debug” error… Or maybe could you propose a debug mode to switch between
   both behaviors? Not meaning to be rude at all, just wanting to participate improving
   your great plugin by sharing my needs and ideas.

The topic ‘exit404 function impacts website cohesion’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-performance-pack_6d9fb6.svg)
 * [WP Performance Pack](https://wordpress.org/plugins/wp-performance-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-performance-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-performance-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-performance-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-performance-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-performance-pack/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [madmax4ever](https://wordpress.org/support/users/madmax4ever/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/exit404-function-impacts-website-cohesion/)
 * Status: resolved