G
G
goodw842017-06-03 20:32:32
Domain name market
goodw84, 2017-06-03 20:32:32

Cross-domain queries for the same domain with and without www?

1. There is a site. The domain is accessed both with htp://www.url.ru and just url.ru
2. The baseurl is registered in the framework configs, which is used in the templates of all pages to form paths to images \ fonts \ styles \ etc. .
3. When entering through www - there are no problems, when entering without www - there is:

Access to Font at ' www.url.ru/fonts/font.woff ' from origin ' url.ru ' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' url.ru ' is therefore not allowed access.

Question: what to do in this situation? Set redirects in .htaccess, allow CORS or something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur Karapetyan, 2017-06-03
@architawr

Leave one domain

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question