We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30157
    • 17 Posts
    1. That didnt seem to work.
    2. I have had friendly urls disabled because they were not working.
    Changing the .htaccess did not solve the problem.
    Do you think doing a clean install and then dumping a backup back in would do anything?
      • 3749
      • 24,544 Posts
      I would say probably not, since you didn’t have this problem before and made changes.

      Be sure to try #1 again now that you’ve done #2. With FURLs off, you shouldn’t have an .htaccess file, so that may have been your problem. In fact, now that the .htaccess is gone, you might try another upgrade install and then clear the caches, since the .htaccess file may have messed with the install (delete the install directory in the old subdirectory site (/modx/install) if you haven’t already).

      If that doesn’t work, put some content of your own on the page identified in Tools | Configuration as your unauthorized_page (don’t change the content there, just add some of your own) and make sure that’s really the page that’s coming up when you try a non-existent URL.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 30157
        • 17 Posts
        Even when I dont have a .htaccess file, I still get the 403 errors. In addition, any redirect 301s that i put in my .htaccess dont work.
          • 3749
          • 24,544 Posts
          With no .htaccess file, put some content of your own on the page identified in Tools | Configuration as your unauthorized_page (don’t change the content there, just add some of your own) and make sure that’s really the page that’s coming up when you try a non-existent URL.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 30157
            • 17 Posts
            Even without the .htaccess I still get the same 403 page.. not the one specified in configuration, but a generic one.
              • 3749
              • 24,544 Posts
              Can you see pages in the front end that do exist even when you go directly to them by URL?
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 30157
                • 17 Posts
                Do you mean can i see a page such as something.html in the root directory even though it is not a modx resource?
                  • 3749
                  • 24,544 Posts
                  Quote from: tkonol at Feb 28, 2010, 11:13 AM

                  Do you mean can i see a page such as something.html in the root directory even though it is not a modx resource?

                  No. I mean can you put http://yoursite.com/index.php?id=7 (assuming that MODx document 7 - or whatever - exists and is published)in your browser’s address window and see document 7 in your browser.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 30157
                    • 17 Posts
                    yes. The site works normally except for furls and the 403 error problem
                      • 3749
                      • 24,544 Posts
                      In that case, I’m almost out of ideas.

                      Try this:

                      look for the following code in manager/includes/document.parser.class.inc.php:

                        function sendErrorPage() {
                              // invoke OnPageNotFound event
                              $this->invokeEvent('OnPageNotFound');
                      //        $this->sendRedirect($this->makeUrl($this->config['error_page'], '', '&refurl=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])), 1);
                              $this->sendForward($this->config['error_page'] ? $this->config['error_page'] : $this->config['site_start'], 'HTTP/1.0 404 Not Found');
                              exit();
                          }
                      
                          function sendUnauthorizedPage() {
                              // invoke OnPageUnauthorized event
                              $_REQUEST['refurl'] = $this->documentIdentifier;
                              $this->invokeEvent('OnPageUnauthorized');
                              if ($this->config['unauthorized_page']) {
                                  $unauthorizedPage= $this->config['unauthorized_page'];
                              } elseif ($this->config['error_page']) {
                                  $unauthorizedPage= $this->config['error_page'];
                              } else {
                                  $unauthorizedPage= $this->config['site_start'];
                              }
                              $this->sendForward($unauthorizedPage, 'HTTP/1.1 401 Unauthorized');
                              exit();
                          }


                      The first thing to try is to put the following lines at the beginning of each function to make sure the correct function is executing:

                      die("Page Not Found -- my message"); // as the first line of the sendErrorPage() function
                      
                      die("Unauthorized Page -- my message"); // as the first line of the sendUnauthorizedPage() function.


                      If you get the right message ("Page Not Found -- my message") when trying to access a doc that doesn’t exist, remove those two lines and try switching the comment in the following lines so sendErrorPage() uses sendRedirect() instead of sendForward:

                              $this->sendRedirect($this->makeUrl($this->config['error_page'], '', '&refurl=' . urlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])), 1);
                      //        $this->sendForward($this->config['error_page'] ? $this->config['error_page'] : $this->config['site_start'], 'HTTP/1.0 404 Not Found');
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting