A
A
Al fox2017-04-28 05:47:49
Apache HTTP Server
Al fox, 2017-04-28 05:47:49

How to set up multidomain in .htcaccess?

In general, there are domains omsk.site.ru, tomsk.site.ru, etc. They all have the same files with different domain generation through sql database. Each domain in its own folder.
In general, how to make all domains access the same file and generate their content? At the same time, new domains will be formed in the future, and you need to register in .htcaccess once.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey L, 2017-04-28
@compudza

What's the problem? In htaccess, you can generally not use a domain, otherwise everything will work.
It's not entirely clear from the question: do you want one set of scripts to give data depending on the domain?
If so, then the issue is not htacess. Define the domain in the script and make selections and output based on this.

V
Viktor Taran, 2017-04-28
@shambler81

And why do you need .htaccess 7
any nix OS family can easily have multiple roots.
For Linux, in fact, any file structure is virtual, since it is itself based on inodes.
So it will be much easier for you to physically place the directory in two places, especially since this is done by 1 command.
And even in MC, so to speak, in the GUI
https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D0%BC%D...
in fact, it's like creating a shortcut to a folder or file .
Moreover, they two options hard and soft.
You need soft.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question