We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27072
    • 76 Posts
    Hello everyone.

    Today, I have changed a rule in my .HTACCESS file, after adding that new rule yesterday.

    However, siteCache.idx.php keeps rebuilding itself with yesterday's information.

    I have gone through seemingly all possible actions before posting this call for help, including:
    * Deleting all cache files, including siteCache.idx.php, letting MODx to build a fresh copy.
    * Checking permissions for .HTACCESS as for assets/cache directory and files.
    * Empty Manager Log and rebuild DB tables.
    * Checked for a Template Switcher plugin in order to remove it (but found none).
    * Empty my IIS7 machine's Recycle Bin.
    * Restart Server.
    * Looking for the old copy of .HTACCESS anywhere on my server.

    Still, siteCache.idx.php is being rebuild each and every time with that outdated .htaccess phantom file.

    Any idea on where that yesterday's htaccess information comes from and why has MODx suddenly stopped using the revised .htaccess file?

    Greatly appreciated,
    Shlomo Tommer

    This question has been answered by BobRay. See the first response.

    [ed. note: shlomot last edited this post 12 years ago.]
      Cheers,
      Shlomo Tommer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      .htaccess has nothing to do with MODX. It is an Apache web server configuration file.

      That said, you should not be using that version of MODX. It's very, very old and has some serious security vulnerabilities that have been fixed in current versions.
        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
        • 27072
        • 76 Posts
        Thanks for your goodwill, sottwell.

        I've made a mistake, calling my framework Revolution 0.9.6 instead of Evolution.
        I believe that at the time I have started with MODx, none of these buzzwords existed yet smiley

        That being told, I would love to hear from you how did a perfect replica of my .HTACCESS file content had reached siteCache.idx.php

        Knowing that, i might be able to understand why its rules array is not being refreshed in siteCache.idx.php
          Cheers,
          Shlomo Tommer
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Perhaps you have a chunk or a snippet or a plugin by that name? The only thing I can think of is that you have something like that which will write the .htaccess file. Because by itself, the .htaccess file is an Apache configuration file, and has nothing at all to do with MODX. Well, other than MODX being dependent on its mod_rewrite features for Friendly URLs.

          http://rtfm.modx.com/evolution/1.0/administration/friendly-url-solutions
            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
            • 27072
            • 76 Posts
            Dear sottwell,

            I am attaching two files:
            1. My .htaccess file
            2. My siteCache.idx.php - which I have deleted and let MODx build from scratch.

            You may see from line 1473 on and exact replica of the .htaccess file, including comment lines and all.

            I swear I haven't put it there myself smiley

            However, the information in siteCache.idx.php is a few days old and doesn't reflect .htaccess' current rules.
              Cheers,
              Shlomo Tommer
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              That's a cached chunk named 'keepHTACCESS'. Apparently you have some kind of custom snippet or plugin installed to do something with the .htaccess file. I have no idea what that might be, or what it's supposed to do. It could even be a TV, TVs don't get cached.

              You also have several snippets that are supposed to get something from the .htaccess file, or a GET value that is written into the URL by the .htaccess file.

                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
              • discuss.answer
                • 3749
                • 24,544 Posts
                If the actual .htaccess file is reverting, it sounds like your MODX install is writing the contents of that chunk to the .htaccess file to make sure it doesn't change (maybe as a response to a hacking attempt) -- probably with a plugin or possibly a snippet.

                If that's the case, you should able to make your edits to that chunk and the actual .htaccess file will be updated the next time the plugin or snippet executes.
                  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
                  • 27072
                  • 76 Posts
                  Right on, BobRay. It was simply a chunk in which i have saved a copy of the .HTACCESS.

                  Thanks for redeeming me out of going nuts, and forgive me all you guys for driving you there smiley

                  Quote from: BobRay at Sep 28, 2014, 10:54 PM
                  If the actual .htaccess file is reverting, it sounds like your MODX install is writing the contents of that chunk to the .htaccess file to make sure it doesn't change (maybe as a response to a hacking attempt) -- probably with a plugin or possibly a snippet.

                  If that's the case, you should able to make your edits to that chunk and the actual .htaccess file will be updated the next time the plugin or snippet executes.
                    Cheers,
                    Shlomo Tommer