redirect if error 404

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    redirect if error 404

    This is an apache question (little off-topic)

    I have this .htaccess in web root
    --------------
    ErrorDocument 404 /error404handler .php
    --------------
    BUT I take in Mozilla this when I call a URL that dont exist:
    --------------------
    Not Found
    The requested URL /this_dont_exist was not found on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an
    ErrorDocument to handle the request.
    ---------------------

    Why Error 403 Forbidden in ErrorDocument?? ?
    both .htaccess and error404handler .php have chmod 644


  • Guest's Avatar

    #2
    Re: redirect if error 404

    > I have this .htaccess in web root[color=blue]
    > --------------
    > ErrorDocument 404 /error404handler .php
    > --------------
    > BUT I take in Mozilla this when I call a URL that dont exist:
    > --------------------
    > Not Found
    > The requested URL /this_dont_exist was not found on this server.
    > Additionally, a 403 Forbidden error was encountered while trying to use an
    > ErrorDocument to handle the request.
    > ---------------------
    >
    > Why Error 403 Forbidden in ErrorDocument?? ?
    > both .htaccess and error404handler .php have chmod 644[/color]

    In server there are many server roots
    My root is

    maybe this is relative?


    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: redirect if error 404

      "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message news:<bpr77k$a0 b$1@nic.grnet.g r>...[color=blue][color=green]
      > > I have this .htaccess in web root
      > > --------------
      > > ErrorDocument 404 /error404handler .php
      > > --------------
      > > BUT I take in Mozilla this when I call a URL that dont exist:
      > > --------------------
      > > Not Found
      > > The requested URL /this_dont_exist was not found on this server.
      > > Additionally, a 403 Forbidden error was encountered while trying to use an
      > > ErrorDocument to handle the request.
      > > ---------------------
      > >
      > > Why Error 403 Forbidden in ErrorDocument?? ?
      > > both .htaccess and error404handler .php have chmod 644[/color]
      >
      > In server there are many server roots
      > My root is
      > http://tassadar.physics.auth.gr/~chameleon/
      > maybe this is relative?[/color]

      You should provide some more hints about your system. Is all
      other .htaccess directives working for you???

      ---
      "Dying is an art, like everything else"---Sylvia Plath
      Email: rrjanbiah-at-Y!com

      Comment

      • FLEB

        #4
        Re: redirect if error 404

        Regarding this well-known quote, often attributed to <- Chameleon ->'s
        famous "Sun, 23 Nov 2003 23:01:57 +0200" speech:
        [color=blue][color=green]
        >> I have this .htaccess in web root
        >> --------------
        >> ErrorDocument 404 /error404handler .php
        >> --------------
        >> BUT I take in Mozilla this when I call a URL that dont exist:
        >> --------------------
        >> Not Found
        >> The requested URL /this_dont_exist was not found on this server.
        >> Additionally, a 403 Forbidden error was encountered while trying to use an
        >> ErrorDocument to handle the request.
        >> ---------------------
        >>
        >> Why Error 403 Forbidden in ErrorDocument?? ?
        >> both .htaccess and error404handler .php have chmod 644[/color]
        >
        > In server there are many server roots
        > My root is
        > http://tassadar.physics.auth.gr/~chameleon/
        > maybe this is relative?[/color]

        Try using the full URL for the redirect. If that works, at least you know
        it's not an .htaccess problem.

        --
        -- Rudy Fleminger
        -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
        (put "Hey!" in the Subject line for priority processing!)
        -- http://www.pixelsaredead.com

        Comment

        Working...