Answer the question
In order to leave comments, you need to log in
Bitrix urlrewrite.php: how to connect a folder?
What rule urlrewrite.php
to specify so that CONDITION
not the physically existing script specified in is connected to the address specified in PATH
, but the entire folder?
This code works:
$arUrlRewrite = [
[
'CONDITION' => '#^/folder_ru/#',
'PATH' => '/folder_en/index.php',
],
];
.section.php
and *.menu.php
which are in /folder_en . When using the above rule, items from the menu disappear because *.menu.php
. .section.php
works. But in this case, the above script does not work. Required : to connect the *.menu.php
and rules from .section.php
.
Answer the question
In order to leave comments, you need to log in
Urlrewrite.php redirects user requests, and the .section.php and *.menu.php files are included in php, there is no direct access to them, so there is nothing to redirect.
If you want files from folder_en to be available in folder_ru, make a symbolic link to them in folder_ru. Almost all hostings allow you to do this operation, and there’s nothing to say about the server.
Command "ln -s [source_file] [reference_file]"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question