About bitrix-routing
A Bitrix development skill for configuring routes and handlers. It is for developers building routed pages and APIs, with guidance on route files, matching behavior, controller protections, and migration from urlrewrite.php.
Key features
- 01Configure route files and routing.config
- 02Define routes, verbs, params, and handlers
- 03Build controller-backed public pages
- 04Understand route matching and compile cache
- 05Migrate from urlrewrite.php
Use cases
- 01Add GET and state-changing routes
- 02Protect routed controller actions
- 03Move legacy URL rules to routing
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ bxmaximum/ bitrix-framework-skills --skill bitrix-routingAfter installing, type/bitrix-routingin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
rules/matching-legacy.mdpublic-pages.mdroutes-handlers.mdsetup.mdDetails
From the project READMEBitrix Routing
Baseline: main 23.0+ · Verified: main 26.800.0
| Task | Read |
|---|---|
Web server rule, routing config, module route files | rules/setup.md |
web.php, verbs, params, names, groups, closure handlers | rules/routes-handlers.md |
Public page on a controller, PublicPageController | rules/public-pages.md |
Match order, compile cache, site-guard, urlrewrite.php migration | rules/matching-legacy.md |
Invariants
- User routes only in
/local/routes/*.php, listed by basename inrouting.config. Module route files arerequired from there. - Handlers are thin:
[Controller::class, 'action']for anything with auth, CSRF or a stable contract. Protect routed controllers with filters (bitrix-controllers), never with->middleware(). - Routed controllers run in
SCOPE_AJAX: the defaultAuthentication+Csrfapply to GET pages too. Drop them per action for public read-only pages. - Explicit verbs (
get/post/…) for state-changing routes,->where()on every param. - A physical file at the same path wins over the route: the web server serves it before
routing_index.php.
Comments
Markdown supported