Created
March 11, 2015 07:02
-
-
Save nishiyamaosamu/62469694e222fc328cce to your computer and use it in GitHub Desktop.
Enable to Nginx proxy cache for wordpress 404.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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