0

After installing Magento 2 CE (version 2.17) fresh version. I found following 404 error of the path on following directory pub/media/styles.css. I found some solution over the internet and I tried that, but no one is work for me. Then on the admin panel, Content->Design->Configuration and on the HTML Head section's "Scripts and Style Sheets" field I found following code

<link rel="stylesheet" type="text/css" media="all" href="{{MEDIA_URL}}styles.css" />

But on the following directory, no file exists.

Please help me to get rid of this problem.

asked Aug 8, 2017 at 11:06

2 Answers 2

0

Try this,

Remove all files with in static folder, not .htaccess, /pub/static/* file. and remove all file with in var/*

Then run,

 <mage-root> rm -rf var/*
 <mage-root>php bin/magento setup:static-content:deploy
 <mage-root>php bin/magento cache:clean

Clear cache, Then check it.

answered Aug 8, 2017 at 11:27
1
  • Thanks @Rajkumar for the reply. But not works for me. the problem is on directory pub/media/ not pub/static. Commented Aug 8, 2017 at 11:50
0

Actually, there is some issue with Magento version or permission, I used this file to load the layout.

https://equaltrue.com/resource/magento/magento2/pub/media/styles.css

Upload the file on root to pub/media

answered Aug 28, 2017 at 17:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.