Two .HTAccess files... do i need to use all two of them?

Dear ModX-r’s,

I’m trying to get my site a bit better and saver, therefore I need to edit something in the .htaccess file (yes, outside MODx to keep it safe)
Now I noticed that I have two versions?! And not because of my own doing I think.
Screenshot 2024-01-15 at 20.26.00

  1. .htaccess
  2. .htaccess.preinstall

They both have a lot of info in them… which one should I use? and why?

Hope to hear form anyone that knows.

I’ve never seen a .htaccess.preinstall file and it’s definitely not from MODX.
(In fact MODX only comes with a file ht.access, and you have to rename it to .htaccess yourself.)

My guess is, that the file .htaccess is the one that gets used.

Can it be that the.htaccess.preinstall is the one I had and that Modx made me a new one during the installation?

MODX only creates a file ht.access with this content:

I need a part that will do a redirect from http:// to https:// in the file… After I inserted this, the site gave a server error. :cry:

This part (of the original MODX ht.access file) should do this

if you uncomment the lines 39-41.

I have the idea that the preinstall one is the original version I have had used before I moved over to MODx. So not sure if the MODx .htaccess content is added or that the original version is being ignored in total.