Skip to content

Instantly share code, notes, and snippets.

@nishiyamaosamu
Created March 11, 2015 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishiyamaosamu/62469694e222fc328cce to your computer and use it in GitHub Desktop.
Save nishiyamaosamu/62469694e222fc328cce to your computer and use it in GitHub Desktop.
Enable to Nginx proxy cache for wordpress 404.
function remove_nocache_on_404(){
if(is_404()){
header_remove("Pragma");
header_remove("Cache-Control");
header_remove("Expires");
}
}
add_action('wp','remove_nocache_on_404');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment