You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cookbook/configuration/apache_router.rst
+15-11Lines changed: 15 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
1
.. index::
2
2
single: Apache Router
3
3
4
-
How to use Apache Router
5
-
========================
4
+
How to use the Apache Router
5
+
============================
6
6
7
7
Symfony2, while fast out of the box, also provides various ways to increase that speed with a little bit of tweaking.
8
8
One of these ways is by letting apache handle routes directly, rather than using Symfony2 for this task.
9
9
10
10
Change Router Configuration Parameters
11
11
--------------------------------------
12
12
13
-
To to be to dump Apache routes we must first tweak configuration parameters and tell
14
-
Symfony2 to use ApacheUrlMatcher instead of the default one:
13
+
To dump Apache routes we must first tweak some configuration parameters to tell
14
+
Symfony2 to use the ``ApacheUrlMatcher`` instead of the default one:
15
15
16
16
.. code-block:: yaml
17
17
@@ -22,12 +22,14 @@ Symfony2 to use ApacheUrlMatcher instead of the default one:
22
22
23
23
.. tip::
24
24
25
-
Note that :class: `Symfony\\Component\\Routing\\Matcher\\ApacheUrlMatcher` extends :class: `Symfony\\Component\\Routing\\Matcher\\UrlMatcher` so even if you don't regenerate
26
-
the url_rewrite rules, everything will work (because at the end of **ApacheUrlMatcher::match()**
27
-
a call to **parent::match()** is done).
25
+
Note that :class:`Symfony\\Component\\Routing\\Matcher\\ApacheUrlMatcher`
26
+
extends :class:`Symfony\\Component\\Routing\\Matcher\\UrlMatcher` so even
27
+
if you don't regenerate the url_rewrite rules, everything will work (because
28
+
at the end of ``ApacheUrlMatcher::match()`` a call to ``parent::match()``
29
+
is done).
28
30
29
31
Generating mod_rewrite rules
30
-
---------------------------
32
+
----------------------------
31
33
32
34
To test that it's working, let's create a very basic route for demo bundle:
33
35
@@ -57,9 +59,10 @@ Which should roughly output the following:
0 commit comments