What is 404 Error Page?
According to Wikipedia,
"The 404 or Not Found error message is a HTTP standard response code
indicating that the client was able to communicate with the server, but
the server could not find what was requested."
In simple English, basically if you try to visit a page on your website that doesn't exist you will end up with some type of 404 error page.
For example on tech-hacks.com, I had a page
http://www.naijaclub10.com/2013/09/will-be-talking-about-wrinkles.html and if you try to visit it, it will show you a blogger 404 page not found message.
That page or any page that doesn't exist, could be redirected to home page, or any other page that you like on your website.
Blogger now offers a custom 404 error page settings. 404 error page setting options are available under Your Blog --> Settings --> Search preferences. Under search preferences you will see something called Errors and redirections, where you can define the message you want to display on your error.
Now here is the meat of the post that you are looking for.
I am going to teach you how to redirect your 404 error page to your home page of any other page. Follow the below Tech-Hacks.Com instructions to redirecting your custom error page to Home Page.
1. Go to Blogger--> Template --> Edit HTML --> Proceed (Please make sure you have backed up your blog).
2. Look for "</head>"
3. Below the above found code you have to paste the following code
If you want to redirect it to a different page you can change "<data:blog.homepageUrl/>" from the step three to whatever url you want to redirect it to. Enjoy one another hack.
In simple English, basically if you try to visit a page on your website that doesn't exist you will end up with some type of 404 error page.
For example on tech-hacks.com, I had a page
http://www.naijaclub10.com/2013/09/will-be-talking-about-wrinkles.html and if you try to visit it, it will show you a blogger 404 page not found message.
That page or any page that doesn't exist, could be redirected to home page, or any other page that you like on your website.
Blogger now offers a custom 404 error page settings. 404 error page setting options are available under Your Blog --> Settings --> Search preferences. Under search preferences you will see something called Errors and redirections, where you can define the message you want to display on your error.
Now here is the meat of the post that you are looking for.
I am going to teach you how to redirect your 404 error page to your home page of any other page. Follow the below Tech-Hacks.Com instructions to redirecting your custom error page to Home Page.
1. Go to Blogger--> Template --> Edit HTML --> Proceed (Please make sure you have backed up your blog).
2. Look for "</head>"
3. Below the above found code you have to paste the following code
<b:if cond='data:blog.pageType == "error_page"'>3. Done! That's it, now your 404 error pages will redirect to your homepage.
<script language="javascript">
window.location='<data:blog.homepageUrl/>';
</script>
</b:if>
If you want to redirect it to a different page you can change "<data:blog.homepageUrl/>" from the step three to whatever url you want to redirect it to. Enjoy one another hack.
No comments:
Post a Comment