Flavio's blog

Around more, The blog site flapane.com

Redirecting errors 404 of WordPress to your homepage

error 404 Redirezionare gli errori 404 di Wordpress alla tua homepage

I learn from blog MrIntech that there is a very interesting how simple trick to eliminate the error 404 that may appear in your , turning them into automatic redirects to the homepage (of , in this case).

As we know, the error 404 stands for “Page not found”. This may be because the page / post has since been removed, or maybe never existed and the user simply mistyped the address.

Personally, I noted many error 404 because the blog entries translated automatically using a special plug-in. Sometimes the pages are not translated, and form of the dead in the sitemap link.

Using this code, automatically disappear all these errors.

Andiamo nella cartella del nostro tema di , we find (or create, if there is no) 404.php page and insert this code ONLY:

<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(&#8216;url&#8217;));
exit();
?>

Save, and load this page on the FTP server.

Now anyone enter an incorrect address, will be automatically redirected to the home page of the blog. This can be useful even to those who do not have direct access to their htaccess file..

Comfortable, not? icon smile Redirezionare gli errori 404 di Wordpress alla tua homepage

oknotizie Redirezionare gli errori 404 di Wordpress alla tua homepagefacebook Redirezionare gli errori 404 di Wordpress alla tua homepageshare save 120 16 Redirezionare gli errori 404 di Wordpress alla tua homepage

Written by flapane the 11 June 2012 in Webdesign, Web 2.0 & SEO | Tags: , , , | 0 Comments »
You can stay updated and read any responses through the feed RSS 2.0, and you can leave a comment, the un trackback (backlink) from your site.