最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - net::ERR_ABORTED 404 (Not Found) - Error in console - Stack Overflow

programmeradmin1浏览0评论

After uploading my wordpress website to live server i am getting error in console about my fonts not found. Due to which mobirise icons are not loaded.

Both files are present in that font folder. Please look into the picture.

I am importing these fonts with these css code in style.css

@font-face {
  font-family: 'MobiriseIcons';
  src:  url('../fonts/Mobirise.eot?5dqoim');
  src:  url('../fonts/Mobirise.eot?5dqoim#iefix') format('embedded-opentype'),
    url('../fonts/Mobirise.ttf?5dqoim') format('truetype'),
    url('../fonts/Mobirise.woff?5dqoim') format('woff'),
    url('../fonts/Mobirise.svg?5dqoim#MobiriseIcons') format('svg');
  font-weight: normal;
  font-style: normal;
}

Can anyone tell me why i am getting this error. Is this error related to my hosting?

After uploading my wordpress website to live server i am getting error in console about my fonts not found. Due to which mobirise icons are not loaded.

Both files are present in that font folder. Please look into the picture.

I am importing these fonts with these css code in style.css

@font-face {
  font-family: 'MobiriseIcons';
  src:  url('../fonts/Mobirise.eot?5dqoim');
  src:  url('../fonts/Mobirise.eot?5dqoim#iefix') format('embedded-opentype'),
    url('../fonts/Mobirise.ttf?5dqoim') format('truetype'),
    url('../fonts/Mobirise.woff?5dqoim') format('woff'),
    url('../fonts/Mobirise.svg?5dqoim#MobiriseIcons') format('svg');
  font-weight: normal;
  font-style: normal;
}

Can anyone tell me why i am getting this error. Is this error related to my hosting?

Share Improve this question asked May 7, 2019 at 19:28 Sujan ShresthaSujan Shrestha 1,0401 gold badge18 silver badges35 bronze badges 1
  • Try accessing that exact URL from the console, in the browser and see if you get a 404 – Tudor Commented May 7, 2019 at 19:36
Add a ment  | 

3 Answers 3

Reset to default 2

I found the answer myself.

@font-face {
  font-family: 'MobiriseIcons';
  src:  url('../fonts/Mobirise.eot?5dqoim');
  src:  url('../fonts/Mobirise.eot?5dqoim#iefix') format('embedded-opentype'),
    url('../fonts/Mobirise.ttf?5dqoim') format('truetype'),
    url('../fonts/Mobirise.woff?5dqoim') format('woff'),
    url('../fonts/Mobirise.svg?5dqoim#MobiriseIcons') format('svg');
  font-weight: normal;
  font-style: normal;
}

In above code i am using Mobirise with capital M whereas the file name is with small m which can be seen in above screenshot.

You need to register your fonts in web.config (system.webServer\staticContent).

<remove fileExtension=".eot"/>
<remove fileExtension=".woff2"/>

<mimeMap fileExtension=".woff2" mimeType="font/woff2"/>
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject"/>
<mimeMap fileExtension=".otf" mimeType="font/otf"/>
<mimeMap fileExtension=".woff" mimeType="font/x-woff"/>

If there is no error no the path then it could be a permission as is stated here: https://stackoverflow./a/43910775/6737468

发布评论

评论列表(0)

  1. 暂无评论