Results 1 to 8 of 8

Thread: No page found redirection (404)

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default No page found redirection (404)

    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

  2. #2
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    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/

  3. #3
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    anyone else have the solution?

  4. #4
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    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/

  5. #5
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Try this

    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
    in a .htaccess file.

    Source:http://www.4webhelp.net/tutorials/misc/errors.php

  6. #6
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    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.

  7. #7
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    This nice article deals with the issue of 404 pages:
    http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  8. #8
    Join Date
    Sep 2008
    Posts
    56
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default customized 404 error pages

    Quote Originally Posted by ff123 View Post
    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/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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •