Font from origin 'http://test.ru' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.test.ru' is therefore not allowed access 

there is a website test.ru , if you go there like this - www.test.ru scripts, fonts, nothing connects, tell me how to handle it?

  • Read about browser security policies (Access-Control-Allow-Origin) and how to configure them on the server (sending a special header). - Alex Krass
  • the server has nothing to do with ... www.test.ru and test.ru - considers it different domains .. how to fix it? - cmd
  • No, because it is a priori different wiki domains : www prefix . Therefore, the question is only this: how to make the server not make a difference for the two domains, one with www and the other without. - Alex Krass

1 answer 1

Redirect 301 via htaccess and forget about the second domain!

 RewriteCond %{HTTP_HOST} ^www\.test\.ru$ RewriteRule (.*) http://test.ru/$1 [R=301,L]