M
M
mills2019-08-26 15:03:58
1C-Bitrix
mills, 2019-08-26 15:03:58

Remove folder from URL with urlrewrite.php?

Hello!
It is necessary that instead of site.ru/directions/udarnye , site.ru/udarnye
would work I made a condition

array (
    'CONDITION' => '#^/#',
    'RULE' => '',
    'ID' => 'bitrix:news',
    'PATH' => '/directions/index.php',
    'SORT' => 100,
  ),

But it doesn't help... The CNC of the infoblock is configured as follows:
5d63c9f9abbec129371927.jpeg
The call code of the bitrix.news component itself, part of the CNC setup
"SEF_FOLDER" => "/directions/", // CNC directory (relative to the site root)
"SEF_MODE" => "Y ", // Enable CNC support
"SEF_URL_TEMPLATES" => array(
"detail" => "#ELEMENT_CODE#/",
"news" => "",
"section" => "",
),
Can someone tell me what problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mills, 2019-08-26
@mills

Resolved this issue. I added a file
to the directions folder , where I entered

Options +FollowSymLinks
RewriteEngine On
 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+directions([^\s]*) [NC]
RewriteRule ^ %1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question