Answer the question
In order to leave comments, you need to log in
How to configure CNC for Bitrix for a specific page?
There is a page on the Bitrix
website with a calculator, you can go to it without parameters:
example.ru/calc/
Either with parameters:
example.ru/calc/?type=123
Parameters are transmitted by GET, in type (numeric
)
example.ru/calc/123
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
RewriteCond %{QUERY_STRING} (^|&)type\=($|&) [NC]
RewriteRule ^calc/?type=$1 calc/$1 [L]
RewriteRule ^calc\/(.*)$ calc/?type=$1 [L]
RewriteRule ^(.+)$ calc/$1 [QSA,L]
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
Answer the question
In order to leave comments, you need to log in
Add to the end of the urlrewrite.php file
array(
"CONDITION" => "#^/calc/([0-9]+)$#",
"RULE" => "type=\$1",
"PATH" => "/calc/index.php",
),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question