Created
July 24, 2014 13:09
-
-
Save fangcat/6190685d79c88b98bc6d to your computer and use it in GitHub Desktop.
停止網址猜測功能
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
add_filter('redirect_canonical', 'stop_guessing'); | |
function stop_guessing($url) { | |
if (is_404()) { | |
return false; | |
} | |
return $url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment