.htaccess has a lock icon on it

What does that mean?

I was able to access it in my Modx Manager, edit it, click “save”, but it doesn’t save my edits. It stays the same as before.

When you save a file, the code checks the file extension. If it is not an allowed file type, then it doesn’t save.

Allowed file types are defined in the system setting upload_files (and in other settings like upload_images, etc.). So, if you add htaccess to the list in upload_files, you should be able to edit the file in the manager. But maybe it is a better idea to change it via FTP.

(Btw: The lock icon is just an icon and doesn’t indicate that the file is uneditable.)

Sorry, I don’t understand. I didn’t change any file extension. I edited the file itself. What does that have to do with file extensions?

MODX checks the file - extension before it saves the file. Only files with a file - extension, which are listed in the system setting upload_files are allowed to be saved.
This is a security thing.
AFAIK, different usergroups could also have different system settings.
This way, you could allow specific file-types only for specific usergroups.

It’s a good idea to edit .htaccess outside of MODX. If you edit it on the MODX Files tab and make even the slightest mistake, your site goes down and you can’t edit the file in MODX any more.

Doing it in File Manager, or the equivalent, means you can change the file on one window, and test the results in another window and immediately correct mistakes that crash the site. It’s much safer and more efficient.