cancel
Showing results for 
Search instead for 
Did you mean: 

am getting 404 error for css and js in magento 2

Highlighted

am getting 404 error for css and js in magento 2

Hi guys ,

                 am getting css and js 404 err0r . belw the error details.

 

GET http://183.83.218.131:8888/naturals/pub/static/frontend/Sm/maximum/en_US/images/loading.svg 404 (Not Found)
require.js:1895 GET http://183.83.218.131:8888/naturals/pub/static/frontend/Sm/maximum/en_US/Sm_Maximum/js/jquery.wow.js net::ERR_ABORTED 404 (Not Found)
http://183.83.218.131:8888/naturals/pub/static/frontend/Sm/maximum/en_US/Magento_Theme/js/responsive... net::ERR_ABORTED 404 (Not Found).

 

can any one guide me ?

5 REPLIES 5
Highlighted

Re: am getting 404 error for css and js in magento 2

Did you try deploying files?

 

php bin/magento setup:static-content:deploy -f

Highlighted

Re: am getting 404 error for css and js in magento 2

yes , but no use

Highlighted

Re: am getting 404 error for css and js in magento 2

you may have error in .htaccess rewrite mod,

Here a part of my .htaccess file from the pub/static (rewrites) :

<IfModule mod_rewrite.c>    RewriteEngine On

    RewriteBase /pub/static
    # Remove signature of the static files that is used to overcome the browser cache
    RewriteRule ^version.+?/(.+)$ $1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-l

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

can you please check the .htaccess file.

 

Reference : https://magento.stackexchange.com/questions/150418/static-content-is-not-loading-after-upgrade 

Highlighted

Re: am getting 404 error for css and js in magento 2

its not wokring 

Highlighted

Re: am getting 404 error for css and js in magento 2

How did you fixed it. Getting same in magento 2.4