I logged into our website today to check out a login failure by some bad actor that had taken place about 90 minutes before I logged in. When I went to the AdminTools page, I found this warning message:
Admin Tools detected that your server configuration file (ie .htaccess, nginx.conf or web.config) has been modified. We strongly suggest you to put any manual edit inside the Custom rules fields, so you won't lose them if you ever regenerate the file using Admin Tools.
We don't use NginX, but the .htaccess and web.config.txt files were dated as last changed on May 24, 2021. The problem was that I hadn't logged in to the site itself since June 1st. I had a problem with the site's email and had logged into the webhost account on May 28 and 29, but nothing in between. As far as I can remember, there isn't anything that's on auto-update. So, I'm not sure how/why those files were modified on May 24th, or whether it had anything to do with today's report of a login failure (unlikely perhaps, but it's a weird coincidence).
In any case, I backed up the whole site, and made a manual backup of .htaccess and web.config.txt, and then clicked the "Regenerate" button in the warning message. However, the regenerated .htaccess broke the site - seemed to have no access to the CSS, as it showed the text but no layout. So I backed up the regenerated version (it seems only .htaccess was changed, not web.config) and restored the original version from the backup I'd made, and the site now displays fine.
But I'm left wondering (a) why the warning message, and (b) why/how the .htaccess and web.config files were modified when I hadn't logged in for a month, and (c) why the regenerated .htaccess broke the site. When I tried to compare the before and after versions of .htaccess, they seem to be structured so differently that I'm not sure I could tell what the differences are.
Many thanks in advance for your help. :-) Let me know if you need anything from me to solve the mysteries (more information, login access, etc).
Since the site is running okay at the moment this isn't an urgent request, but I don't like so many mysteries happening at once, so it would be great to understand what's going on with this.