Created
April 28, 2020 10:06
-
-
Save Farmatique/303085fd61853ae55befe4368db284c7 to your computer and use it in GitHub Desktop.
Wordpress redirect all 404 to homepage
This file contains hidden or 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
| /* put code below in 404.php */ | |
| <?php | |
| header("HTTP/1.1 301 Moved Permanently"); | |
| header("Location: ".get_bloginfo('url')); | |
| exit(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment