Magento2.2 refused to apply css because its MIME type ('text/html') not supportedCustom CSS does not applyMagento 2 CSS does not applyMagento2 CSS was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)how to change color code of header and footer in m2Magento 2 why CSS was blocked due to MIME type mismatchRefused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”How to install node_modules in server for grunt configuationMagento 2 : Refuse to apply styleEdit css of cart's coupon code input

Does the sign matter for proportionality?

Does a semiconductor follow Ohm's law?

Packing rectangles: Does rotation ever help?

How to make a pipeline wait for end-of-file or stop after an error?

Why do games have consumables?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Is there really no use for MD5 anymore?

A Strange Latex Symbol

What is the difference between `command a[bc]d` and `command `ab,cd`

How exactly does Hawking radiation decrease the mass of black holes?

Will a top journal at least read my introduction?

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Controversial area of mathematics

Pass By Reference VS Pass by Value

Is there a way to get a compiler for the original B programming language?

Stop and Take a Breath!

How can I place the product on a social media post better?

Does holding a wand and speaking its command word count as V/S/M spell components?

Examples of subgroups where it's nontrivial to show closure under multiplication?

Repelling Blast: Must targets always be pushed back?

How could Tony Stark make this in Endgame?

Is the 5 MB static resource size limit 5,242,880 bytes or 5,000,000 bytes?

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

What's the polite way to say "I need to urinate"?



Magento2.2 refused to apply css because its MIME type ('text/html') not supported


Custom CSS does not applyMagento 2 CSS does not applyMagento2 CSS was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)how to change color code of header and footer in m2Magento 2 why CSS was blocked due to MIME type mismatchRefused to apply style “because its MIME type ('text/html') is not a supported stylesheet MIME type”How to install node_modules in server for grunt configuationMagento 2 : Refuse to apply styleEdit css of cart's coupon code input






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Magento2.2 apache php7 server I moved the website from a Nginx server to this apache2 server. cleared cache, the magento is in default mode still so no need to re-deploy.



However now i get an error that says



Refused to apply style from 'pub/static/frontend/Smartwave/porto_child/en_US/css/styles-m.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


Refused to apply style from ' pub/static/frontend/Smartwave/porto_child/en_US/css/styles-l.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


I already did a chmod -R 777 * in the website directory and also a chown -R ubuntu:ubuntu on the directory for the site site. so not sure what else needs to be done to fix this?










share|improve this question




























    0















    Magento2.2 apache php7 server I moved the website from a Nginx server to this apache2 server. cleared cache, the magento is in default mode still so no need to re-deploy.



    However now i get an error that says



    Refused to apply style from 'pub/static/frontend/Smartwave/porto_child/en_US/css/styles-m.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


    Refused to apply style from ' pub/static/frontend/Smartwave/porto_child/en_US/css/styles-l.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


    I already did a chmod -R 777 * in the website directory and also a chown -R ubuntu:ubuntu on the directory for the site site. so not sure what else needs to be done to fix this?










    share|improve this question
























      0












      0








      0








      Magento2.2 apache php7 server I moved the website from a Nginx server to this apache2 server. cleared cache, the magento is in default mode still so no need to re-deploy.



      However now i get an error that says



      Refused to apply style from 'pub/static/frontend/Smartwave/porto_child/en_US/css/styles-m.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


      Refused to apply style from ' pub/static/frontend/Smartwave/porto_child/en_US/css/styles-l.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


      I already did a chmod -R 777 * in the website directory and also a chown -R ubuntu:ubuntu on the directory for the site site. so not sure what else needs to be done to fix this?










      share|improve this question














      Magento2.2 apache php7 server I moved the website from a Nginx server to this apache2 server. cleared cache, the magento is in default mode still so no need to re-deploy.



      However now i get an error that says



      Refused to apply style from 'pub/static/frontend/Smartwave/porto_child/en_US/css/styles-m.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


      Refused to apply style from ' pub/static/frontend/Smartwave/porto_child/en_US/css/styles-l.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


      I already did a chmod -R 777 * in the website directory and also a chown -R ubuntu:ubuntu on the directory for the site site. so not sure what else needs to be done to fix this?







      magento2.2 css






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 1 '18 at 16:14









      JayJay

      134




      134




















          2 Answers
          2






          active

          oldest

          votes


















          0














          In Chrome/Firefox browser if content-type header is mixed then link will not load. This is browser strict feature.



          Can you open that files in new tab of both browsers? & Please verify the content & header - Content-Type in Network tab by press F12.



          If you don't see the right content or Content-Type then run below command:



          rm -Rf pub/static/frontend/*

          php bin/magento setup:static-content:deploy -t Theme/name -f





          share|improve this answer






























            0














            Go to your layout xml file under the




            appcodeyournamespaceyourmoduleviewfrontendlayout




            Here in the head section put your extension name before including CSS like -



            <head>
            <css src="yournamespace_yourmodule::css/yourcssname.css" />
            </head>





            share|improve this answer























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "479"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f228374%2fmagento2-2-refused-to-apply-css-because-its-mime-type-text-html-not-supporte%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              In Chrome/Firefox browser if content-type header is mixed then link will not load. This is browser strict feature.



              Can you open that files in new tab of both browsers? & Please verify the content & header - Content-Type in Network tab by press F12.



              If you don't see the right content or Content-Type then run below command:



              rm -Rf pub/static/frontend/*

              php bin/magento setup:static-content:deploy -t Theme/name -f





              share|improve this answer



























                0














                In Chrome/Firefox browser if content-type header is mixed then link will not load. This is browser strict feature.



                Can you open that files in new tab of both browsers? & Please verify the content & header - Content-Type in Network tab by press F12.



                If you don't see the right content or Content-Type then run below command:



                rm -Rf pub/static/frontend/*

                php bin/magento setup:static-content:deploy -t Theme/name -f





                share|improve this answer

























                  0












                  0








                  0







                  In Chrome/Firefox browser if content-type header is mixed then link will not load. This is browser strict feature.



                  Can you open that files in new tab of both browsers? & Please verify the content & header - Content-Type in Network tab by press F12.



                  If you don't see the right content or Content-Type then run below command:



                  rm -Rf pub/static/frontend/*

                  php bin/magento setup:static-content:deploy -t Theme/name -f





                  share|improve this answer













                  In Chrome/Firefox browser if content-type header is mixed then link will not load. This is browser strict feature.



                  Can you open that files in new tab of both browsers? & Please verify the content & header - Content-Type in Network tab by press F12.



                  If you don't see the right content or Content-Type then run below command:



                  rm -Rf pub/static/frontend/*

                  php bin/magento setup:static-content:deploy -t Theme/name -f






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 1 '18 at 19:23









                  AnanthAnanth

                  544




                  544























                      0














                      Go to your layout xml file under the




                      appcodeyournamespaceyourmoduleviewfrontendlayout




                      Here in the head section put your extension name before including CSS like -



                      <head>
                      <css src="yournamespace_yourmodule::css/yourcssname.css" />
                      </head>





                      share|improve this answer



























                        0














                        Go to your layout xml file under the




                        appcodeyournamespaceyourmoduleviewfrontendlayout




                        Here in the head section put your extension name before including CSS like -



                        <head>
                        <css src="yournamespace_yourmodule::css/yourcssname.css" />
                        </head>





                        share|improve this answer

























                          0












                          0








                          0







                          Go to your layout xml file under the




                          appcodeyournamespaceyourmoduleviewfrontendlayout




                          Here in the head section put your extension name before including CSS like -



                          <head>
                          <css src="yournamespace_yourmodule::css/yourcssname.css" />
                          </head>





                          share|improve this answer













                          Go to your layout xml file under the




                          appcodeyournamespaceyourmoduleviewfrontendlayout




                          Here in the head section put your extension name before including CSS like -



                          <head>
                          <css src="yournamespace_yourmodule::css/yourcssname.css" />
                          </head>






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Aug 2 '18 at 12:00









                          Sachin TyagiSachin Tyagi

                          13




                          13



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Magento Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f228374%2fmagento2-2-refused-to-apply-css-because-its-mime-type-text-html-not-supporte%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Sum ergo cogito? 1 nng

                              419 nièngy_Soadمي 19bal1.5o_g

                              Queiggey Chernihivv 9NnOo i Zw X QqKk LpB