-1

I can't see the icomoon icons in production because it returns a 404 error:

GET /icons/icomoon.woff net::ERR_ABORTED 404 (Not Found)

GET /icons/icomoon.woff2 net::ERR_ABORTED 404 (Not Found)

THE FILES ARE IN THE RIGHT ROUTE: public/icons

I have the following code in public/icons/style.css:

font-face {
  font-family: 'icomoon';
  src:
    url('icomoon.woff') format('woff'),
    url('icomoon.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

I've tried to put the src this way:

  src: url('icomoon.woff') format('woff');
  src: url('icomoon.woff2') format('woff2');

But it didn't work.

I've also tried to put the following code in public/web.config:

<system.webServer>
    <staticContent>
      <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
      <remove fileExtension=".woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>

And it also din't work.

varo90
  • 56
  • 1
  • 9

1 Answers1

1

Solved, Cloudways has disabled the execution of .woff files by default. All I had to do is open a ticket and ask them to enable it.

varo90
  • 56
  • 1
  • 9