Answer the question
In order to leave comments, you need to log in
How to create a Rule for UrlRewrite?
Good afternoon. Help compose rules for UrlRewrite to get variable.
There is a page /brands/#brand_name#/?section=2
It needs to open at the address for example /brands/#brand_name#/2/
There is a page /brands/#brand_name#/?section=divany
It needs to open at the address for example /brands/#brand_name#/divany/
Answer the question
In order to leave comments, you need to log in
[
'CONDITION' => '#^/brands/[^/]+/([\d]+)/(\?.+|$)#',
'RULE' => 'SECTION_ID=$1&REST=$2',
'ID' => '',
'PATH' => '/catalog/index.php',
'SORT' => 1
],
[
'CONDITION' => '#^/brands/[^/]+/([^/]+)/(\?.+|$)#',
'RULE' => 'SECTION_CODE=$1&REST=$2',
'ID' => '',
'PATH' => '/catalog/index.php',
'SORT' => 2
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question