WP 301 Redirect on my 404.php error page
OK I'm looking to add this code in my 404.php error page in WordPress.
<?php
header("Status: 301 Moved Permanently");
header("Location:h-t-t-p://w-w-w.domain.com");
?>
NOte: the dashes in the code above are only there because I can not post links in the forum.
This will give me a nice 301 redirect.
I wanted to add the WP home page URL code in place of the domain.com.
my issue is I not sure what the WP code is for grabbing the home site domain URL.
Hope this makes sense.
Thanks
Chad
-
Istvan Horvath -
Thanks
Signature
{{ DiscussionBoard.errors[3163831].message }} -
-
ChadCook -
Thanks - 1 reply
{{ DiscussionBoard.errors[3163940].message }}-
Istvan Horvath -
Thanks
Signature
{{ DiscussionBoard.errors[3163979].message }} -
-
-
crystalq -
Thanks
SignatureNewbies! A Free "Affiliates Avoid" Guide for You! | Visit IINTERNETMONEY.COM NOW!{{ DiscussionBoard.errors[4467993].message }} -