We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21838
    • 284 Posts
    Quote from: Letti at Dec 05, 2010, 04:09 PM

    Quote from: smooth-graphics at Dec 05, 2010, 02:28 PM

    what problem do you exactly have with this solution from Marc posted in German board? (apart from the error page which could be sovled via htaccess 404 page-setting)
    It was exactly the error-page which didn´t work anymore after implementing Marc´s solution. Because of this we couldn´t use Marc´s solution.
    Do you think this can be solve by modification of the htaccess-page?
    No, not directly. If possible for your requirements of the website you could set a 404 document / url in the htaccess file. It’s not the same as modx 404 but a solid server thing.
    Otherwise, it’s working totally correct with error handling in Marc’s demo-site - this error page ssl-thing, so maybe there’s something in your configuration not working properly?
      MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
      • 17016
      • 138 Posts
      Quote from: smooth-graphics at Dec 05, 2010, 02:28 PM

      No, not directly. If possible for your requirements of the website you could set a 404 document / url in the htaccess file. It’s not the same as modx 404 but a solid server thing.
      Otherwise, it’s working totally correct with error handling in Marc’s demo-site - this error page ssl-thing, so maybe there’s something in your configuration not working properly?
      In our case the error-page is not working correctly. The same in Marc’s demo-site. If you type in a fantasy file-name on his posted demo-url you are redirected to his index-page (the same in our case).

      But maybe we can solve this by adding a line in the htaccess. Does anybody has an idea what we have to add in the htaccess to get a correct error-page?

      Letti
        • 21838
        • 284 Posts
        Quote from: Letti at Dec 05, 2010, 04:39 PM
        In our case the error-page is not working correctly. The same in Marc’s demo-site. If you type in a fantasy file-name on his posted demo-url you are redirected to his index-page (the same in our case).
        But maybe we can solve this by adding a line in the htaccess. Does anybody has an idea what we have to add in the htaccess to get a correct error-page?
        Thought it would be the preferred method (home page instead of error doc)...
        Her you go for .htaccess:

        The initial slash in the directory location represents the root directory of your site, that being where your default page for your first-level domain is located.
        ErrorDocument 400 /errors/badrequest.html
        ErrorDocument 401 /errors/authreqd.html
        ErrorDocument 403 /errors/forbid.html
        ErrorDocument 404 /errors/notfound.html
        ErrorDocument 500 /errors/serverr.html
        
          MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
          • 17016
          • 138 Posts
          Thanks a lot. I will try it out! Making this work it would resolve a big problem in our setting.

          Letti
            • 17016
            • 138 Posts
            Hi smooth-graphics,

            unfortunately it doesn´t work: We added "ErrorDocument 404 /error-page.html" at several places of the htaccess-file, but if you type in an invalid file-name MODx still returns the start-page, while the unauthorized-access-page (401) works fine...

              • 17016
              • 138 Posts
              The command in htaccess "ErrorDocument 404 /error-page.html" even doesn´t work in our MODx-configuration when we disable Marc´s plugin...
                • 26903
                • 1,336 Posts
                You need a FileInfo override for ErrorDocument directives in .htaccess files, see http://httpd.apache.org/docs/2.0/mod/core.html#errordocument
                  Use MODx, or the cat gets it!
                  • 17016
                  • 138 Posts
                  Quote from: shamblett at Dec 06, 2010, 05:51 AM

                  You need a FileInfo override for ErrorDocument directives in .htaccess files, see http://httpd.apache.org/docs/2.0/mod/core.html#errordocument
                  We added in the htaccess: "ErrorDocument 404 /error-page.html"

                  Do you think this is not enough? Or do we have to add more commands in the htaccess? At least we didn´t find more information about this on the page of your recommended link.
                    • 21838
                    • 284 Posts
                    Quote from: Letti at Dec 06, 2010, 06:08 AM
                    We added in the htaccess: "ErrorDocument 404 /error-page.html"
                    Do you think this is not enough? Or do we have to add more commands in the htaccess? At least we didn´t find more information about this on the page of your recommended link.

                    Are your permissions (server, htaccess) enough to do this?
                    Do you really have the right path? Then it should work.
                    Please also check if this snippet works for you:
                    ErrorDocument 404 "Seite nicht gefunden / site not found."

                    Think you need to disable MODx Error settings.

                    And, here sth to notice for IE users. You should place a html-comment inside your file to increase file size.
                    Der Microsoft Internet Explorer (MSIE) ignoriert standardmäßig serverseitig generierte Fehlermeldungen, wenn sie "zu kurz" sind und ersetzt sie durch eigene "freundliche" Fehlermeldungen. Die Größe variiert abhängig von der Art des Fehlers, im Allgemeinen zeigt der MSIE jedoch den serverseitig generierten Fehler, anstatt ihn zu verstecken, wenn Ihr Fehlerdokument größer als 512 Bytes ist. Weitere Informationen sind im Artikel Q294807 in der Microsoft Knowledgebase verfügbar.
                      MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                      • 26903
                      • 1,336 Posts
                      You need to check your AllowOverride settings to see if the ErrorDocument is being read in your .htaccess file. See http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride
                        Use MODx, or the cat gets it!