We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20498
    • 21 Posts
    Hi, I know how to direct error pages to a custom html page with a normal .htaccess file but i cannot figure out how to get it to work with the htaccess file that comes with modx. I am using this htaccess file for my friendly urls but any page that should be a 404 page is going strait to my home page which is id=1. I am curious if i can set up my own error page as i have in the past with a really basic .htaccess file. I tried to add the following to the modx .htaccess file but it didnt work.
    ErrorDocument 404 /index.php?id=15
    ErrorDocument 401 /index.php?id=15
    ErrorDocument 400 /index.php?id=15
    ErrorDocument 500 /index.php?id=15

    Any help would be much appreciated. I hope i made sense in explaining this. To sum it up, i want to direct my 404 pages to my own error page and not strait to my home page, while using the friendly urls .htaccess file. Thanks
      • 32319
      • 129 Posts
      Go to Tools>Configuration>Site>Error page: and enter the pageID of your custom error page.

      That should do it...
        "Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable."
        -- Sydney Harris
        • 20498
        • 21 Posts
        Ha, Unreal I feel really dumb. Here I was trying to do it manually when its all setup already for me. Thanks a ton! haha
          • 32319
          • 129 Posts
          Quote from: mschroeder at Mar 28, 2007, 06:36 PM

          Ha, Unreal I feel really dumb. Here I was trying to do it manually when its all setup already for me. Thanks a ton! haha
          No worries, that is a very common feeling when you start using MODx. Almost everything is a lot easier than it should be. wink
            "Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable."
            -- Sydney Harris