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
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
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/
anyone else have the solution?
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-...with-htaccess/
in a .htaccess file.Code: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
Source:http://www.4webhelp.net/tutorials/misc/errors.php
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.
This nice article deals with the issue of 404 pages:
http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/
Hello
I think you should follow Google instructions regarding customized 404 error pages here
http://www.google.com/support/webmas...n&answer=93641
Hope this helps!
Cheers
Maneet Puri
Last edited by Snookerman; 05-08-2009 at 10:48 AM. Reason: removed link in signature
Bookmarks