L
L
lookin @lookin2011-12-29 11:37:29
PHP
lookin @lookin, 2011-12-29 11:37:29

How convenient is it to serve many similar sites on subdomains?

There are 15 very similar sites on subdomains (you can say the same) a1.test.ru, a2.test.ru, etc.

Accordingly, if the idea came up to change the color of the link from red to green, now you need to change 15 css files - It's hemorrhoids.

The removal of one common css for all sites to the css.test.ru subdomain and its subsequent insertion is fraught with something. There will be an extra request to the server, I understand that. The fact that the request will be to another domain will affect how?

Again. It was:
link href="/_css/main.css"

Will become: Maybe it can be processed somehow through php?
link href="http://css.test.ru/_css/common.css"
//общие стили для всех сайтов на поддоменах

link href="/_css/main.css"
//стили для конкретного поддомена

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Iskander Giniyatullin, 2011-12-29
'

The fact that there will be a request to another domain will have a positive effect and will have a positive effect on the loading time of the site.
So transfer to a new domain and don't worry, everything will be OK!

S
shadowalone, 2011-12-29
@shadowalone

In principle, there is nothing wrong with this.
But if you are very paranoid, then you can create hard links to one file in each domain and edit only it, if all domains are on the same file system.

V
Vlad Zhivotnev, 2011-12-29
@inkvizitor68sl

If you really don't want to, then use nginx. He can do miracles.

Z
ZloiZmei, 2011-12-29
@ZloiZmei

Tell me, how are the sites different? In terms of manageability, it seems to me that it would be more convenient to send 15 domains to 1 site. And depending on the domain, issue different elements (for example, different content)

B
Boris Syomov, 2011-12-29
@kotomyava

This is quite the right decision. And the plus is not only that you will have only 1 file for all subdomains - this can be achieved in many ways.
Even if there was only one site, it would be better to move all the statics to a separate subdomain. this will save on the transfer of cookies. =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question