Warning: You are browsing the documentation for Symfony 3.0, which is no longer maintained.
Read the updated version of this page for Symfony 5.3 (the current stable version).
How to Use the Apache Router
How to Use the Apache Router¶
Using the Apache Router is no longer considered a good practice. The small increase obtained in the application routing performance is not worth the hassle of continuously updating the routes configuration.
The Apache Router will be removed in Symfony 3 and it’s highly recommended to not use it in your applications.
Symfony, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking. One of these ways is by letting Apache handle routes directly, rather than using Symfony for this task.
Apache router was deprecated in Symfony 2.5 and removed in Symfony 3.0. Since the PHP implementation of the Router was improved, performance gains were no longer significant (while it’s very hard to replicate the same behavior).
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.