A
A
Alexander Ivanov2016-08-04 15:39:49
PHP
Alexander Ivanov, 2016-08-04 15:39:49

How to configure cnc on a subdomain?

There was a task to make 2 sites on, 1 subdomain, with one Bitrix admin panel.
As expected, I placed the site in a separate folder in public_html.
Set up .htaccess

RewriteCond %{HTTP_HOST} ^(www\.)?market\.site\.ru$ [NC]
RewriteCond %{REQUEST_URI} !/market
RewriteCond %{REQUEST_URI} !less$ [NC]
RewriteRule (.*) /market/$1 [L]

how it looks in cnc (urlrewrite.php):
array(
    "CONDITION" => "#^/market/salon/#",
    "RULE" => "",
    "ID" => "bitrix:news",
    "PATH" => "/market/salon/index.php",
  ),

Everything works without a subdomain, but not with it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Savrasov, 2016-08-07
@cimonlebedev

If you implement multi-site
Then you need to:
1) in the folder with the second site, add symlinks to the bitrix and upload folder
2) create a second site through the admin panel, specify the full path to the root, specify the subdomain on which it should respond.
3) Register the path for the first site and the domain on which it responds.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question