What is the best way to deal with .htaccess files in subdirectories?
From what I understand, OpenLiteSpeed only reads the .htacess files in the main directory of the website.
Using the example of PrestaShop, there are several .htaccess files listed in subdirectories. From a search, these are the files I could find:
- ./translations/.htaccess
- ./translations/cldr/.htaccess
- ./themes/.htaccess
- ./themes/classic/config/.htaccess
- ./vendor/.htaccess
- ./vendor/tecnickcom/tcpdf/tools/.htaccess
- ./vendor/mrclay/minify/min/.htaccess
- ./vendor/mrclay/minify/min/builder/.htaccess
- ./vendor/prestashop/smarty/.htaccess
- ./cache/.htaccess
- ./.htaccess
- ./override/.htaccess
- ./classes/.htaccess
- ./mails/.htaccess
- ./controllers/.htaccess
- ./modules/.htaccess
- ./app/.htaccess
- ./upload/.htaccess
- ./config/.htaccess
- ./config/xml/.htaccess
- ./js/.htaccess
- ./admin877zpdps0/.htaccess
- ./admin877zpdps0/import/.htaccess
- ./admin877zpdps0/export/.htaccess
- ./admin877zpdps0/backups/.htaccess
- ./docs/.htaccess
- ./docs/csv_import/.htaccess
- ./src/.htaccess
- ./pdf/.htaccess
- ./tools/.htaccess
- ./tools/parser_sql/.htaccess
- ./tools/htmlpurifier/.htaccess
- ./tools/profiling/.htaccess
- ./bin/.htaccess
- ./download/.htaccess
- ./localization/.htaccess
- ./img/.htaccess
I also understand the directory option cannot be read in the main .htaccess file so I can’t move everything to a single file.
I thought of the following solutions:
- Move all the file properties to Contextes within the WebAdmin panel.
- Use rewrite rules in the main .htaccess file for the information in the .htaccess subdirectory files
