D
D
Dmitry2020-12-10 14:12:08
1C-Bitrix
Dmitry, 2020-12-10 14:12:08

Detail page doesn't work, error 404, urlrewrite when multisite, what could be the problem?

Good afternoon, for the first time I encountered multisite. We have an English version in the /en/ folder. The product list page (news.list) works correctly, the path is site/en/products-list/.
Sections also work (bitrix:catalog.section).
But when going to the detailed page, it gives a 404 error. In news.list and news.detail, the infoblock identifier matches. I sin on the incorrect entry of the rule in urlrewrite.

2 => 
  array (
    'CONDITION' => '#^(/?[a-zA-Z]{0,2})/products/([a-zA-Z_0-9-]+)/([a-zA-Z_0-9-]+)/($|\\?.*)#',
    'RULE' => 'LANG=$1&SECTION_CODE=$2&ELEMENT_CODE=$3',
    'ID' => '',
    'PATH' => '/products/detail.php',
    'SORT' => 100,
  ),
  8 => 
  array (
    'CONDITION' => '#^(/?[a-zA-Z]{0,2})/en/products-list/([a-zA-Z_0-9-]+)/([a-zA-Z_0-9-]+)/($|\\?.*)#',
    'RULE' => 'LANG=$2&SECTION_CODE=$2&ELEMENT_CODE=$3',
    'ID' => '',
    'PATH' => '/en/products-list/detail.php',
    'SORT' => 100,
  ),


Rule 2 for the regular version works correctly, rule 8 does not work, please tell me where to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-12-10
@Deemc

Add to 404.php
<? print_r($_REQUEST);?>
and see the presence of variables
Dmitry ,
Something like this, not sure

1 => 
  array (
    'CONDITION' => '#^/en/products-list/(.+?)/(.+?)/\\??(.*)#',
    'RULE' => 'SECTION_CODE=$1&ELEMENT_CODE=$2,
    'ID' => '',
    'PATH' => '/en/products-list/detail.php',
    'SORT' => 100,
  ),

Well, and see what the detail expects...
Approximately it should be:
"ELEMENT_CODE" => $_REQUEST["ELEMENT_CODE"]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question