Routing and URLs
Routing defines which controller handles a request based on its URL. Pimcore's routing builds on top of Symfony routing and adds document-based routing, custom routes, URL slugs, and redirects.
Routing Priority
Pimcore processes routes in the following order:
1. System / Symfony Routes
Routes defined by Pimcore core, Symfony, or custom bundles. These are standard Symfony routes and have the highest priority.
Use the router debugger to list all configured Symfony routes:
./bin/console debug:router
2. Redirects with Priority 99
Redirects configured with priority 99 override all other dynamic routes. See Redirects for details.
3. Pimcore Documents and Pretty URLs
The document tree path defines the public URL. Individual documents can also have Pretty URLs configured as alternative paths. See Documents and Pretty URLs for details.
4. URL Slugs of Data Objects
The URL Slug data type allows defining URLs for data objects. These must be unique and are evaluated per site.
5. Custom Routes
For pages without a corresponding document (product lists, checkout flows, etc.), Custom Routes map URL patterns to specific controllers.
6. Redirects
All redirects with priority lower than 99 are processed last, ordered by their configured priority. See Redirects for details.
Multi-domain Sites
The routing process supports multi-domain sites. See Working with Sites for details.