View Full Version : No page found redirection (404)
ff123
05-04-2009, 09:57 AM
hey... anyone know about the code for redirection to home page if invalid link is opened i.e ( www.urdomain.com/93e3de3dhiedu )
is it in htaccess
forum_amnesiac
05-04-2009, 10:47 AM
Everything I've read about an error 404 page that auto redirects advises against using this approach.
There are cases in which you could get stuck in an endless loop.
Most advice is to have an error 404 page that has the various links to the site, eg a site map, and some sort of 'apology'.
Here is a link about creating 404 pages - http://www.alistapart.com/articles/perfect404/
ff123
05-04-2009, 11:57 AM
anyone else have the solution?
Schmoopy
05-04-2009, 12:33 PM
This is to do with htaccess, search around on google for it and you should find some scripts.
Like a 404 error that takes you to a customised page, here's something to help you get started:
http://blog.4rev.net/2007-11/custom-404-error-page-with-htaccess/
Bob90
05-04-2009, 01:14 PM
ErrorDocument 404 /path/to/your/error/file/or/script
ErrorDocument 500 /path/to/your/error/file/or/script
ErrorDocument 403 /path/to/your/error/file/or/script
in a .htaccess file.
Source:http://www.4webhelp.net/tutorials/misc/errors.php
forum_amnesiac
05-04-2009, 01:44 PM
I agree that using a .htaccess file is the right way to go, I'm just not convinced that a redirect to the home page is the right way to go.
Explain to the visitor why he can't see the page he selected and then give them options, ie a sitemap, is much friendlier.
Snookerman
05-04-2009, 02:43 PM
This nice article deals with the issue of 404 pages:
http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/ (http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/)
maneetpuri
05-08-2009, 08:22 AM
hey... anyone know about the code for redirection to home page if invalid link is opened i.e ( www.urdomain.com/93e3de3dhiedu )
is it in htaccess
Hello
I think you should follow Google instructions regarding customized 404 error pages here
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93641
Hope this helps!
Cheers
Maneet Puri
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.