File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -499,12 +499,12 @@ redirect between them.
499
499
Symfony follows this logic to redirect between URLs with and without trailing
500
500
slashes (but only for ``GET `` and ``HEAD `` requests):
501
501
502
- ---------- ---------------------------------------- ------------------------------------------
502
+ ========== ======================================== ==========================================
503
503
Route path If the requested URL is ``/foo `` If the requested URL is ``/foo/ ``
504
- ---------- ---------------------------------------- ------------------------------------------
504
+ ========== ======================================== ==========================================
505
505
``/foo `` It matches (``200 `` status response) It doesn't match (``404 `` status response)
506
506
``/foo/ `` It makes a ``301 `` redirect to ``/foo/ `` It matches (``200 `` status response)
507
- ---------- ---------------------------------------- ------------------------------------------
507
+ ========== ======================================== ==========================================
508
508
509
509
In summary, adding a trailing slash in the route path is the best way to ensure
510
510
that both URLs work. Read the :doc: `/routing/redirect_trailing_slash ` article to
You can’t perform that action at this time.
0 commit comments