1

I have a custom CSS file created and loaded through code. The compile less option is set to yes in configuration settings. When I clear the static content flush from cache management in admin panel and reload frontend, it gives an error that the CSS file not found pub/static/frontend/vendor/modulename/en_US/css/test.css. But when I run command php bin/magento setup:static-content:deploy my test.css file is loaded. I have my apache run through user test and Magento ownership is also test. How to fix this issue?

0

Check you magento site mode is development then

File Path : pub/static/.htaccess

  RewriteRule .* ../static.php?resource=$0 [L] 

This code is automatically copied the files

0

Did you try clear pub/static folder exept .htaccess ? Then setup:static-content:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.