S
S
Sergey2019-02-07 13:24:58
css
Sergey, 2019-02-07 13:24:58

How to use the same styles from a domain on subdomains?

There is a multilingual site. Different versions lie on subdomains.
How to organize the connection of styles and fonts from the main domain so as not to copy files to each hosting directory?
If I link like this, http://website.site/css/style.cssthen CORS is blocked.
Is it possible to allow something similar in .htaccess and how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2019-02-07
@djQuery

Do I understand correctly that you and CDN cannot be used?

P
Prog, 2019-02-07
@damprog

add to header
Access-Control-Allow-Origin: website.site

B
Boris Korobkov, 2019-02-07
@BorisKorobkov

You can download everything from the same domain.
If the sites are on the same server, then you can make a symlink. Or set up a web server for proxying. Or at least automatically copy the css file during deployment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question