Skip to content

Commit 37b13e1

Browse files
committed
[symfony#3071] Minor tweaks to a nice facelift for this entry
1 parent 524869d commit 37b13e1

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

cookbook/routing/redirect_in_config.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.. index::
22
single: Routing; Redirect using Framework:RedirectController
33

4-
How to Configure a Redirect Without a Custom Controller
4+
How to Configure a Redirect without a Custom Controller
55
=======================================================
66

77
Sometimes, a URL needs to redirect to another URL. You can do that by creating
8-
a new controller action which only task is to redirect, but using the
8+
a new controller action whose only task is to redirect, but using the
99
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\RedirectController` of
10-
the FrameworkBundle, it's a lot easier.
10+
the FrameworkBundle is even easier.
1111

1212
You can redirect to a specific path (e.g. ``/about``) or to a specific route
13-
using it's name (e.g. ``homepage``).
13+
using its name (e.g. ``homepage``).
1414

1515
Redirecting Using a Path
1616
------------------------
@@ -26,7 +26,7 @@ action to redirect to this new url:
2626
2727
# app/config/routing.yml
2828
29-
# loading the App controllers
29+
# load some routes - one should ultimately have the path "/app"
3030
AppBundle:
3131
resource: "@AcmeAppBundle/Controller/"
3232
type: annotation
@@ -49,7 +49,7 @@ action to redirect to this new url:
4949
xsi:schemaLocation="http://symfony.com/schema/routing
5050
http://symfony.com/schema/routing/routing-1.0.xsd">
5151
52-
<!-- loading the App controllers -->
52+
<!-- load some routes - one should ultimately have the path "/app" -->
5353
<import resource="@AcmeAppBundle/Controller/"
5454
type="annotation"
5555
prefix="/app"
@@ -71,7 +71,7 @@ action to redirect to this new url:
7171
7272
$collection = new RouteCollection();
7373
74-
// loading the App controllers
74+
// load some routes - one should ultimately have the path "/app"
7575
$acmeApp = $loader->import(
7676
"@AcmeAppBundle/Controller/",
7777
"annotation"
@@ -90,9 +90,9 @@ action to redirect to this new url:
9090
return $collection;
9191
9292
In this example, you configured a route for the ``/`` path and let the
93-
``RedirectController`` handle it to redirect it to ``/app``. The ``permanent``
94-
switch tells the action to issue a ``301`` HTTP status code instead of the
95-
default ``302`` HTTP status code.
93+
``RedirectController`` redirect it to ``/app``. The ``permanent`` switch
94+
tells the action to issue a ``301`` HTTP status code instead of the default
95+
``302`` HTTP status code.
9696

9797
Redirecting Using a Route
9898
-------------------------

0 commit comments

Comments
 (0)