.. include:: ../../Includes.txt .. _backend-routing: =============== Backend Routing =============== Each request to the backend is eventually executed by a controller. A list of routes is defined which maps a given request to a controller and an action. Routes are defined inside extensions, in file :file:`Configuration/Backend/Routes.php` for general requests and in :file:`Configuration/Backend/AjaxRoutes.php` for AJAX calls. Here is an extract of :file:`typo3/sysext/backend/Configuration/Backend/Routes.php`: .. code-block:: php [ 'path' => '/login', 'access' => 'public', 'target' => Controller\LoginController::class . '::formAction', ], // Main backend rendering setup (previously called backend.php) for the TYPO3 Backend 'main' => [ 'path' => '/main', 'target' => Controller\BackendController::class . '::mainAction', ], // ... ]; So a routes file essentially returns an array containing routes mapping. A route is defined by a key, a path and a target. The "public" :code:`access` property indicates that no authentication is required for that action. More Information ================ Please refer to the following external resources and look at how the TYPO3 source code handles backend routing in your TYPO3 version. * `Scripting-Base: "PSR-7 for backend modules" `__ * `Scripting-Base: "AJAX with PSR-7" `__ * `PSR-7 `__ * TYPO3 core: `backend : AjaxRoutes.php `__ (GitHub) * TYPO3 core: `backend : Routes.php `__ (GitHub)