Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress 404.php redirect to home

<?php
// NOTE: create this file name on your child theme: 404.php and add the code:
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
Source by muffingroup.com #
 
PREVIOUS NEXT
Tagged: #wordpress #redirect #home
ADD COMMENT
Topic
Name
5+6 =