docs icon indicating copy to clipboard operation
docs copied to clipboard

During child theme creation add step to copy .htaccess from parent if this is a needed step

Open Hokuto-shinken opened this issue 2 years ago • 1 comments

Hi dear,

I was watching a quick tuto on Youtube about creating a child theme. And during the tutorial, there was mentioned that copying the .htaccess from config dir to the new config dir of the child theme as something that was needed in order to protect it. And going back to the https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/ page I saw no mention about it.

Please could you kindly let me know if this is needed, and if the devdocs page needs to be updated?

Thanks

Hokuto-shinken avatar Mar 25 '22 00:03 Hokuto-shinken

Hello @Hokuto-shinken if you expose the PrestaShop folder in a directory available to the public, you indeed need to make sure you only expose the files you want to be downloaded, like CSS and JavaScript files.

In order to protect files such as PHP code files, you can use a .htaccess but other options are available and depend on your hosting environment.

@kpodemski what do you think?

matks avatar Mar 27 '22 20:03 matks