Простой тест для проверки проведенной настройки:
1. Зайти на страницу "Настройки" - "Настройки продукта" - "Обработка адресов"
2. Выбирать пункт "Новая запись" и добавить:
Условие: #^/sef_test/#
Компонент: ничего не указываем
Файл: /index.php (нужно указать файл, который фактически будет работать)
Правило: ничего не указываем.
Сохранить изменения.
3. Перейти по адресу в разделе /sef_test/
Например, http://localhost/sef_test/test.html
Если ЧПУ работает, то вы должны увидеть содержимое страницы, указанной в поле Файл в правиле переопределения.
Примеры:
1. Если в системе обработки адресов зарегистрировано правило:
Условие = #^/gallery/#
Файл = /max/images/index.php
и пользователем запрошена страница /gallery/38.php, которая физически не существует, то система обработки адресов подключит скрипт /max/images/index.php.
2. Если в системе обработки адресов зарегистрировано правило:
Условие = #^/index/([0-9]+)/([0-9]+)/#
Правило = mode=read&CID=$1&GID=$2
Файл = /newforum/index.php
и пользователем запрошена страница /index/5/48/, то будет подключен скрипт /newforum/index.php?mode=read&CID=5&GID=48.
3. Если в системе обработки адресов зарегистрировано правило:
Условие = #(.+?)\\.html(.*)#
Правило = $1.php$2
и пользователем запрошена страница /about/company.html?show, то будет подключен скрипт /about/company.php?show.
[Bitrix\Main\ObjectNotFoundException] Forum is not found. (510) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/forum/lib/forum.php:305 #0: Bitrix\Forum\Forum->__construct(integer) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/forum/lib/internals/entityfabric.php:20 #1: Bitrix\Forum\Forum::getById(integer) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/forum/classes/general/forum_new.php:559 #2: CAllForumNew::GetUserPermission(integer, array) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/forum/include.php:141 #3: ForumCurrUserPermissions(integer) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/components/bitrix/forum.topic.reviews/component.php:177 #4: include(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:605 #5: CBitrixComponent->__includeComponent() /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:680 #6: CBitrixComponent->includeComponent(string, array, object, boolean) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/main.php:1039 #7: CAllMain->IncludeComponent(string, string, array, object) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/components/bitrix/news/templates/.default/detail.php:150 #8: include(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component_template.php:789 #9: CBitrixComponentTemplate->__IncludePHPTemplate(array, array, string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component_template.php:884 #10: CBitrixComponentTemplate->IncludeTemplate(array) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:764 #11: CBitrixComponent->showComponentTemplate() /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:712 #12: CBitrixComponent->includeComponentTemplate(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/components/bitrix/news/component.php:216 #13: include(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:605 #14: CBitrixComponent->__includeComponent() /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/component.php:680 #15: CBitrixComponent->includeComponent(string, array, boolean, boolean) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/classes/general/main.php:1039 #16: CAllMain->IncludeComponent(string, string, array, boolean) /home/host1328954/k-78.ru/htdocs/suvenir/content/articles/index.php:113 #17: include_once(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/modules/main/include/urlrewrite.php:159 #18: include_once(string) /home/host1328954/k-78.ru/htdocs/suvenir/bitrix/urlrewrite.php:2