how to make non existant pages redirect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    how to make non existant pages redirect

    Hi
    How can I make it so my web hosting server will redirect all hits to non
    existant web pages to the main index.html page?


    Thanks in advance


  • William Tasso

    #2
    Re: how to make non existant pages redirect

    Mike wrote:[color=blue]
    > How can I make it so my web hosting server will redirect all hits to
    > non existant web pages to the main index.html page?[/color]

    That will depend on which web server your site uses. The buzzword you need
    is 404.

    As to whether doing that is a good thing or not is open to debate. Some
    would prefer to inform the visitor that the page does not exist and offer
    alternatives.

    --
    William Tasso


    Comment

    • Daniel R. Tobias

      #3
      Re: how to make non existant pages redirect

      William Tasso wrote:
      [color=blue]
      > As to whether doing that is a good thing or not is open to debate.
      > Some would prefer to inform the visitor that the page does not exist
      > and offer alternatives.[/color]

      Not to mention that if you suppress the normal 404 error result,
      automated link checkers, search engine indexers, and the like, would
      fail to recognize that the page doesn't exist, so lots of wrong
      addresses in your site would remain in links and indexes elsewhere.

      --
      == Dan ==
      Dan's Mail Format Site: http://mailformat.dan.info/
      Dan's Web Tips: http://webtips.dan.info/
      Dan's Domain Site: http://domains.dan.info/

      Comment

      • Philipp Lenssen

        #4
        Re: how to make non existant pages redirect

        Mike wrote:
        [color=blue]
        > How can I make it so my web hosting server will redirect all hits to
        > non existant web pages to the main index.html page?
        >[/color]

        If it's an Apache web server, add your own 404. Something like this in
        an .htaccess file:

        ErrorDocument 404 /file-not-found.html

        However don't redirect to the main page. Instead inform the user the
        page doesn't exist. You can still offer the usual links or whatever
        makes the main index.html the homepage.

        Comment

        • Mike

          #5
          Re: how to make non existant pages redirect


          "Mike" <mikeccc@mindsp ring.com> wrote in message
          news:OxLTb.1532 9$fA.3475194@ne ws4.srv.hcvlny. cv.net...[color=blue]
          > Hi
          > How can I make it so my web hosting server will redirect all hits to non
          > existant web pages to the main index.html page?
          >
          >
          > Thanks in advance
          >
          >[/color]

          Thanks in advance

          OK, I will try it out. But do you think I should leave the old pages there
          for the sake of the search engines and modify the code in the old pages to
          redirect, or should I just wipe out these very old html files and let the
          search engine rebuild?

          THanks


          Comment

          • Sherm Pendley

            #6
            Re: how to make non existant pages redirect

            Mike wrote:
            [color=blue]
            > OK, I will try it out. But do you think I should leave the old pages
            > there for the sake of the search engines and modify the code in the old
            > pages to redirect, or should I just wipe out these very old html files and
            > let the search engine rebuild?[/color]

            Pages that have *moved* are a completely different animal... If your server
            allows it, you should set up redirects that return HTTP status 301 - "Moved
            Permanently". Spiders should then take the hint and update their database
            appropriately.

            If it's Apache, and the server is configured to allow it, you could put the
            following in your .htaccess file:

            Redirect permanent /old/page.html /new/page.html

            If the page has been replaced with a new one that supercedes it, use
            'seeother' instead of 'permanent', and apache will generate a "303 - See
            Other" status. If the page in question has simply been removed with no
            replacement, you could use 'gone' to trigger a "410 - Gone" response.

            sherm--

            Comment

            • David Dorward

              #7
              Re: how to make non existant pages redirect

              William Tasso wrote:
              [color=blue]
              > As to whether doing that is a good thing or not is open to debate. Some
              > would prefer to inform the visitor that the page does not exist and offer
              > alternatives.[/color]

              Indeed: http://www.alistapart.com/articles/perfect404/


              --
              David Dorward <http://dorward.me.uk/>

              Comment

              • Jon Bell

                #8
                Re: how to make non existant pages redirect

                In article <SsadnZ8LQskpIo LdRVn-tA@adelphia.com >,
                Sherm Pendley <spamtrap@dot-app.org> wrote:[color=blue]
                >
                >If it's Apache, and the server is configured to allow it, you could put the
                >following in your .htaccess file:
                >
                >Redirect permanent /old/page.html /new/page.html[/color]

                The destination must be specified as a complete URL, which might look like

                Redirect permanent /old/page.html http://your.site/new/page.html

                --
                Jon Bell <jtbellm4h@pres by.edu> Presbyterian College
                Dept. of Physics and Computer Science Clinton, South Carolina USA

                Comment

                Working...