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

    I recently turned on friendly urls, ensuring that I renamed my ht.access files to .htaccess in the site root and the manager folder. I updated the .htaccess to RewriteBase and RewriteRule to accommodate the fact the site is in a subfolder as per the wiki.

    Now the site looks and operates fine EXCEPT when I’m logged into the manager. The page begins to load with the resource button and looks fine until suddenly when to page loads I’m given a 404 error.

    Anyone else encounter this problem or have any suggestions for resolving this?


      • 4810
      • 6 Posts
      Anyone?
        • 3749
        • 24,544 Posts
        There should be an .htaccess file in the /manager directory that turns the rewrite engine off.
          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
          • 4810
          • 6 Posts
          Thanks for replying BobRay.

          Is this what you would expect my manager .htaccess file to look like?

          RewriteEngine Off
          
          <IfModule mod_security.c>
          # Turn the filtering engine Off
          SecFilterEngine Off
          </IfModule>


          This is what my modx .htaccess file looks like
          # For full documentation and other suggested options, please see
          # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
          # including for unexpected logouts in multi-server/cloud environments
          
          Options +FollowSymlinks
          RewriteEngine On
          RewriteBase /modx
          
          # Fix Apache internal dummy connections from breaking [(site_url)] cache
          RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
          RewriteRule .* - [F,L]
          
          # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
          #RewriteCond %{HTTP_HOST} .
          #RewriteCond %{HTTP_HOST} !^example\.com [NC]
          #RewriteRule (.*) http://example.com/$1 [R=301,L]
          
          # Exclude /assets and /manager directories from rewrite rules
          RewriteRule ^(manager|assets) - [L]
          
          # For Friendly URLs
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$  /modx/index.php?q=$1 [L,QSA]
          
          # Reduce server overhead by enabling output compression if supported.
          #php_flag zlib.output_compression On
          #php_value zlib.output_compression_level 5


            • 3749
            • 24,544 Posts
            That looks about right. Try clearing the MODx cache and your browser cache/cookies. If that doesn’t work, try commenting out the follow symlinks line.

            That’s all I can think of.
              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
              • 4810
              • 6 Posts
              Thanks BobRay.

              Commenting out the line: Options +FollowSymlinks fixed it.
                • 3749
                • 24,544 Posts
                Glad it’s working. smiley
                  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