We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30277
    • 75 Posts
    Hi

    I am trying to have a custom 404 so i did create a doc called errors ( container) i created a doc called 404 under it and paste my stuff in it .I added ID of my 404 doc to my manager/config/error page.

    When i go a non exist page on my site like mysite.com/sucks ( laugh ) it keeps that address in address bar but shows me the content of my 404 page instead redirect me to mysite.com/errors/404

    I tryed to add this to my .hta but not work either
    ErrorDocument 404 http://www.mysite.com/errors/404

    what i am doing wrong please huh

    Thanks
      • 24414
      • 45 Posts
      I think that you actually have the correct behaviour here. A 404 page should output the nonexistent URL with the error message. No URL redirecting needs to occur, just the error display (as you seem to be describing).

      Or am I missing the point?
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: ram at Jun 10, 2007, 05:35 PM

        I think that you actually have the correct behaviour here. A 404 page should output the nonexistent URL with the error message. No URL redirecting needs to occur, just the error display (as you seem to be describing).

        Or am I missing the point?
        That is correct, a 404 response should be returned from the existing URL they are attempting to access. A redirect would basically tell search engines or other bots that the URL was successful (just moved).
          • 30277
          • 75 Posts
          Hi
          Sorry for late answering
          Thanks Ram, Opengeek

          I surf some good sites and saw that you are right they just give a 404 on current non exist pages .I just thought something wrong with my setup cause my current sucky cms just redirects every non exist urls to my error page and since iam new i thought thats the way things work.

          Now i learnt something new thanks again smiley