Lỗi .woff2 404 - File or directory not found trên iis windows

Thảo luận trong 'Lập trình web Asp.net' bắt đầu bởi seolagi, 15/10/20.

  1. seolagi
    Tham gia ngày:
    16/4/14
    Bài viết:
    1,027
    Đã được thích:
    80
    Điểm thành tích:
    48
    Cái fonts chữ của mình có đuôi .woff2 và .woff nó truy cập không được trên iis 8 của mình, trong khi file có trong hệ thống, các file đuôi khác thì truy cập bình thường, còn các đuôi woff nó không truy cập được báo lỗi dưới.

    Giúp mình với

    404 - File or directory not found.
    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
     
    Cảm ơn đã xem bài:

    Lỗi .woff2 404 - File or directory not found trên iis windows

  2. admin
    Tham gia ngày:
    22/5/13
    Bài viết:
    4,883
    Đã được thích:
    1,193
    Điểm thành tích:
    113
    Giới tính:
    Nam
    Bạn truy cập vào web.config tìn tới <system.webServer> và thêm dữ liệu sao vào nhé

    Mã:
      
    <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>
    </system.webServer>