We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6316
    • 92 Posts
    I have a minor problem about .htaccess password protecting directories. Basically, there is MODx installation in "root" of my site (e.g., http://www.mydomain.com/). There is a folder, e.g. mydomain.com/folder/. I passworded /folder/ but whenever I try to access it, it gives me 404 error (not even 403!) called from MODx.

    If I get rid of MODx .htaccess from my root, everything works fine.

    Any ideas how to fix that?
    Thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Put another .htaccess with the appropriate entries in your /folder/ folder; it will probably need to have rewrite engine off (see the .htaccess file in the /manager/ folder)

      .htaccess files are inherited, so if you need something different in a child folder you need to put one there.
        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
        • 6316
        • 92 Posts
        Found it! Your method didn’t work, however putting in .htaccess

        ErrorDocument 401 /index.php
        ErrorDocument 403 /index.php

        to the passworded /folder/ helped