Skip to content

Unable to modify .htaccess in static directory #6285

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
ihor-sviziev opened this issue Aug 23, 2016 · 2 comments
Closed

Unable to modify .htaccess in static directory #6285

ihor-sviziev opened this issue Aug 23, 2016 · 2 comments

Comments

@ihor-sviziev
Copy link
Contributor

I have CORS requests issue with fonts when I using CDN. In order to fix it I'm changing my .htaccess. During deployment I do composer install. After that my changes were reverted.

Preconditions

  1. Magento 2.1.0 installed via composer
  2. Base Static URL is CDN domain (CloudFront in my case)

Steps to reproduce

  1. Install Magento 2 via composer
  2. Change your file pub/static/.htaccess (as example add Header set Access-Control-Allow-Origin "*")
  3. Remove vendor directory
  4. Do composer install

Expected result

My pub/static/.htaccess file should not be overridden.

Actual result

My pub/static/.htaccess file is overridden and my changes were reverted.

Possible solutions:

  • Do not add this file to map listing in composer.json of magento2-base package, move it to magento/product-community-edition package
  • Add ability to override htaccess
@hostep
Copy link
Contributor

hostep commented Aug 23, 2016

I don't know if there is a good solution for this, but here are some related issues:

This comment is a possible solution, but Magento will need to change some things before that can happen probably.

@piotrekkaminski
Copy link
Contributor

Thank you for your submission.

We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues.

Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here).

We are closing this GitHub ticket and have moved your request to the new forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants