Skip to content

Avoid explicitly putting .htaccess and Grunt theme config in place #4930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CNanninga opened this issue Jun 8, 2016 · 3 comments
Closed
Assignees
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@CNanninga
Copy link

The following two files (at least) are put in place by the Composer install process, and therefore on each environment where an M2 site is deployed and the install run, any site-specific modifications are overwritten with a vanilla version of the file:

  • pub/.htaccess
  • dev/tools/grunt/configs/themes.js

However, both of these files are likely to need legitimate site-specific modifications (such as site-specific rewrite rules, or the addition of other themes to the Grunt config), and so it's undesirable for them to be overwritten during Composer install.

These files should likely be replaced with versions suffixed with ".sample", and the process of putting the real version in place should be part of a site setup.

@hostep
Copy link
Contributor

hostep commented Jun 8, 2016

There were already some similar tickets:

Although the .htaccess file wasn't mentioned in those.

The problem I see with the .htaccess file, is that this is a file which is actually used in a production environment (in contrary to those other files) and if Magento fixes a security hole somewhere and needs to add some lines to the .htaccess to prevent this security issue, you might miss it when upgrading.

If you modify the .htaccess file yourself, you should definitely put it into your version control system, and upon upgrade you'll notice it has changed that file, so you should check it out and manually figure out what to do with the changes.

@wert2all wert2all self-assigned this Jun 23, 2016
@guz-anton
Copy link
Contributor

Just a notice: internal ticket MAGETWO-55345 has been created.

@guz-anton guz-anton self-assigned this Jul 13, 2016
@sshrewz sshrewz added the linked label Aug 11, 2016
@wert2all wert2all removed their assignment Aug 17, 2016
@vkorotun vkorotun added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed linked labels Aug 22, 2016
@guz-anton
Copy link
Contributor

The issue with theme.js is solved. See #1981 for details.
The issue about .htaccess is a topic of another investigation. I'm closing in flavor of #6419.

magento-engcom-team pushed a commit that referenced this issue Oct 30, 2019
[Magento Community Engineering] Community Contributions - 2.3-develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants