My website is in default mode only. After run "setup:upgrade" my web does not load the resources css or js. "Refused to apply style from ” because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled."
Any idea what might be causing this problem?
4
Answers
If you are using Linux then change the mode to
developer
and then runphp bin/magento cache:flush
from the document root of the webserver.If you are using Windows then please follow the below steps:
developer
php bin/magento cache:flush
from the project directorybin/magento setup:static-content:deploy -f
from the project directoryPlease let me know how it goes!
Try this
Set permissions to the files as follows
Set permissions to the directories as follows
Set permissions to special directories: as follows (these commands solve your file uploading issue)
Solution –
<Directory /var/www/>
, Change "AllowOverride None" to "AllowOverride All" 2. Add this at last in env.php located at <MagentoRootDirectory/app/etc><item name="view_preprocessed" xsi:type="object">
Under that Modify thisMagentoFrameworkAppViewAssetMaterializationStrategySymlink
toMagentoFrameworkAppViewAssetMaterializationStrategyCopy
INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0) ON DUPLICATE KEY UPDATE value = 0;
UPDATE core_config_data SET value = '0' WHERE core_config_data.path LIKE '%web/seo/use_rewrites%';
sudo a2enmod rewrite
Please check the .htaccess file in pub/static/.htaccess. If not then please add it.
thanks!!