Handling of the root .htaccess file

I’ve got a few questions about the .htaccess file located in the webroot directory. (/typo3/public/.htaccess) Sadly I haven’t found much info about this in the official documentation.


[1] If I check the “Directory Status” function (located at “Backend => Admin Tools => Environment”), then I get the following warning for the .htaccess file:

File /public/.htaccess content differs

File content is not identical to default content. This file may have been changed manually. The Install Tool will not overwrite the current version!

I could really need some clarifications here. Does Typo3 automatically update the .htaccess file when performing updates? And if it’s supposed to do that, does the warning from above mean that the process is no longer happening? Not even when performing major upgrades?

Also what if I exclusively put my changes after the “# Add your own rules here.” line? Will this trigger the above mentoined warning or not?

[2] I did not actually modify the files content myself. When checking my .htaccess for differences to the vanilla content, it’s just some very minor stuff, i.e. a new file extension for a few FilesMatch declarations. Not sure what went wrong here. Do you regularly check for new additions and/or discrepancies inside your root .htaccess file?

[3] I assume that I can safely reset my .htaccess file by just copy & pasting the contents of typo3/typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess?


Hopefully some Typo3 expert can help me out with these questions.

Regards, Nefiji