We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 365
    • 9 Posts
    The default ht.access file that comes with Modx 2.0.8 has this:

    IndexIgnore */*
    <Files *.php>
        Order Deny,Allow
        Deny from all
    </Files>


    What does that do? Should I keep or remove it? Apologies if this has been asked before, I couldn’t find the answer by searching.

    Edit: Just noticed I pulled the one from Core instead of Root. I guess that is important to protect the core directory.
      • 22840
      • 1,572 Posts
      I think it’s to stop attacks on .php files huh
        • 3749
        • 24,544 Posts
        You probably know this, but for other readers of this thread: you have to rename it to .htaccess in order for it to have any effect. ht.access means nothing to the server -- it’s just another file.
          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
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          I don’t see that code in the default ht.access file (https://github.com/modxcms/revolution/blob/develop/ht.access)

          If that code was in the file you may want to consider downloading the zip again (from the modx site), to make sure it hasn’t been tampered with.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 22840
            • 1,572 Posts
            Quote from: AMDbuilder at Apr 28, 2011, 11:14 PM

            I don’t see that code in the default ht.access file (https://github.com/modxcms/revolution/blob/develop/ht.access)

            If that code was in the file you may want to consider downloading the zip again (from the modx site), to make sure it hasn’t been tampered with.

            Just downloaded 2.0.8 and can confirm it’s not part of the standard ht.access however it is in the ht.access in the core folder
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Quote from: paulp at Apr 29, 2011, 04:29 AM

              Quote from: AMDbuilder at Apr 28, 2011, 11:14 PM

              I don’t see that code in the default ht.access file (https://github.com/modxcms/revolution/blob/develop/ht.access)

              If that code was in the file you may want to consider downloading the zip again (from the modx site), to make sure it hasn’t been tampered with.

              Just downloaded 2.0.8 and can confirm it’s not part of the standard ht.access however it is in the ht.access in the core folder

              Ah, that would make sense. The core folder should be above public_html or if you can’t do that you should block all web access to the folder (which is what the code in question does). I always put core above public_html so I never look at that ht.access file.
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting