We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47630
    • 56 Posts
    I am experiencing a very similar issue but I am not using Gallery.

    Using Modx version 2.2.14 traditional.

    Everything was working normally until I set up friendly url's.

    htaccess forces the site to go to www.exampledomain.com

    However, when I opened manager i had been using exampledomain/manager.com, the result was nothing was working in manager.
    After i log out & back in using www.exampledomain/manager.com I found that the only part not working is the resources tree. In Elements & Files I can save stuff.

    The icons are no longer available in Resources and I can no longer create new pages (even when using 'site/newdocument' i get access denied when trying to save it.

    I have tried every conceivable combination of flushing cache/permissions & browser cached but nothing seems to work.

    Anyone got any ideas what I can do here?

    I just got friendly urls working, I do not want to remove them already.
    • Make sure cookies for your domain are deleted.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 47630
        • 56 Posts
        Quote from: sottwell at Jun 28, 2014, 05:05 AM
        Make sure cookies for your domain are deleted.

        Could you explain in a little more detail what you mean?
        I've cleared the browser cache & cookies.

        Now I am also finding that i get the following error ('action_err_ns') when try to flush permissions or clear the cache in admin.

        Flush all sessions will log me out without receiving an error though.
        • Just making sure that you don't have any stale cookies hanging around.

          Try going to the /manager/ directory and copying the ht.access file there to .htaccess; all it should be doing is turning the RewriteEngine off for the manager.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 47630
            • 56 Posts
            Hmmmm,

            I found in Manager directory one .htaccess file, it only has one line;

            RewriteEngine Off

            Surely this is correct???
              • 47630
              • 56 Posts
              Just wondering, the following is my .htaccess in the root:

              # Friendly URLs Part
              RewriteEngine On
              RewriteBase /
              RewriteCond %{HTTP_HOST} .
              # Force all pages to go to www.example.com for SEO
              RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
              RewriteRule (.*) http://www.example.com/$1 [R=301,L]
              RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index)\.(html|php|htm)\ HTTP/ [NC]
              RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ http://www.example.com/$1 [L,R=301]
              # Friendly URLs
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
              # Additional Settings Follow
              ExpiresActive On
              ExpiresByType image/gif A2592000
              ExpiresByType image/jpeg A2592000
              ExpiresByType image/png A2592000
              BrowserMatch "MSIE" brokenvary=1
              BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
              BrowserMatch "Opera" !brokenvary
              SetEnvIf brokenvary 1 force-no-vary
              
              


              Is there anything in there that could affect the admin manager?
              • I don't know what these lines do
                RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*(default|index)\.(html|php|htm)\ HTTP/ [NC]
                RewriteRule ^(([^/]+/)*)(default|main|index)\.(html|php|htm)$ http://www.example.com/$1 [L,R=301]
                


                The Manager uses a lot of AJAX, so it's quite possible that something in the root directory's .htaccess could be interfering with the AJAX requests.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 47630
                  • 56 Posts
                  Its purpose is to return only 1 url, for the home page there were 3 variants of the url so this is viewed as duplicate content.

                  The code works for the homepage (always 1 url returned) although I'm unsure what other implications that using this can produce (i just c&p the code from a google search).
                    • 47630
                    • 56 Posts
                    Hi Sottwell,

                    I removed those 2 lines & now admin manager works. Thank you for the heads up smiley

                    Maybe it is a better idea to use specific re-writes than using generic ones.