1
zivXP
Icon fonts are not displayed
  • 2023/2/12 12:25

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Why are icon fonts not displayed on the site?

If the url is without www - fonts are displayed
https://corder.ru/

If the url is from www - fonts are not displayed
https://www.corder.ru/

2
heyula
Re: Icon fonts are not displayed
  • 2023/2/12 12:39

  • heyula

  • Theme Designer

  • Posts: 590

  • Since: 2008/4/24


Add the following code to your .htaccess file in the Main Directory;
<FilesMatch ".(ttf|otf|eot|woff|woff2)$">
  <
IfModule mod_headers.c>
    
Header set Access-Control-Allow-Origin "*"
  
</IfModule>
</
FilesMatch>

3
zivXP
Re: Icon fonts are not displayed
  • 2023/2/12 13:41

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Thanks for the answer, but it doesn't help
Also tried Header set Access-Control-Allow-Origin "*" - that didn't help either

4
heyula
Re: Icon fonts are not displayed
  • 2023/2/12 15:18

  • heyula

  • Theme Designer

  • Posts: 590

  • Since: 2008/4/24


Quote:

zivXP wrote:
Thanks for the answer, but it doesn't help
Also tried Header set Access-Control-Allow-Origin "*" - that didn't help either


You may not realize it, but the code completely solved your problem.

Example :https://corder.ru/

Resized Image


Example :https://www.corder.ru/

Resized Image


If you clear the caches in your browser, the result will be the same for you.

I have this problem most of the time and I always use this solution.

Demo:
https://erenyumak.com/modules/xmcontent/viewcontent.php?content_id=13

5
zivXP
Re: Icon fonts are not displayed
  • 2023/2/12 15:42

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Yes, it has become clear now. Thanks for the help

6
zivXP
Re: Icon fonts are not displayed
  • 2023/2/13 7:48

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


The directive may not work. By default, Nginx handles static files.
Translated to Apache content types fonts.
You have become great.

7
zivXP
Re: Icon fonts are not displayed
  • 2023/2/13 9:09

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


You can only add a file to a folder "fonts". Will also work.
I hope they understand me through a translator?

Login

Who's Online

181 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits