Good day to all. There are some problems with the coding (I'm not sure that this is the problem, the lack of knowledge does not allow to specifically identify the problem) on the site.

enter image description here

This happens only when I am not logged in to the site. If I log in on the site, then this problem for some reason disappears and everything is displayed correctly. I wrote about this problem to the creators of the theme that I use for my site.

The answer was as follows: Access-Control-Allow-Origin: * Access-Control-Allow -Origin: As you can see the red lines:

After that I turned to the hosting and received the following answer: "This question does not apply to the hosting. This is a restriction on the use of files from a third-party resource. You get an error because there is no such rule on a third-party resource."

The following code has been added to .htaccess (not fully displayed here):

Header set Access-Control-Allow-Origin "*"

But nothing happened, the problem remained. Further I read that it is necessary to include the mod_headers module. I turned again to the hosting, where they said the following:

"In order for directives from the .htaccess file to work for all requests, you need to exclude all file extensions from the list of static ones. Note that in this mode of operation the load on the hosting account will increase slightly. This module is enabled and works for all sites. Requests for files from the list of static ones does not reach Apache (it processes the .htaccess files and directives from them). All files that are in the static list will give to nginx and such requests will not reach Apache.

And indeed, after removing all static extensions, the problem disappeared and the site began to display correctly. But the question arises. Will the site load from such actions greatly increase? On the Internet, they write that the required module is turned on by one command - a2enmod headers, but the support guys did not want to help me with this and offered to remove the extensions, which I did. Does it make sense to continue to bend your line with the inclusion of the module through the command or the removal of extensions also fit?

  • What static extensions are we talking about? Show the .htaccess code before and after. And yes - what exactly is the problem? In Chinese characters on the sides or symbol in the menu? - KAGG Design
  • Found your site. The icon was not displayed in the menu, because the Flaticon font was not loaded. And what kind of Chinese characters on the sides - it is not clear. Now there are no markup for them. - KAGG Design

0