Skip to content

Instantly share code, notes, and snippets.

@dima731515
Last active April 17, 2023 14:33
Show Gist options
  • Save dima731515/c0a4b06f155dcd6a7f268cb6284ca478 to your computer and use it in GitHub Desktop.
Save dima731515/c0a4b06f155dcd6a7f268cb6284ca478 to your computer and use it in GitHub Desktop.
ЧПУ для axja запросов Битрикс
// теперь можно делать запросы к компоненту вида:
/api/v1/custom/ajax/class.php
<?php
$arUrlRewrite = [
// ...
[
"CONDITION" => "#^/api/v1/([a-zA-Z0-9]+)/([a-zA-Z0-9\.]+)/([a-zA-Z0-9]+)/?.*#",
"RULE" => "mode=class&c=$1:$2&action=$3",
"PATH" => "/bitrix/services/main/ajax.php",
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment