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.
499499Symfony follows this logic to redirect between URLs with and without trailing
500500slashes (but only for ``GET `` and ``HEAD `` requests):
501501
502- ---------- ---------------------------------------- ------------------------------------------
502+ ========== ======================================== ==========================================
503503Route path If the requested URL is ``/foo `` If the requested URL is ``/foo/ ``
504- ---------- ---------------------------------------- ------------------------------------------
504+ ========== ======================================== ==========================================
505505``/foo `` It matches (``200 `` status response) It doesn't match (``404 `` status response)
506506``/foo/ `` It makes a ``301 `` redirect to ``/foo/ `` It matches (``200 `` status response)
507- ---------- ---------------------------------------- ------------------------------------------
507+ ========== ======================================== ==========================================
508508
509509In summary, adding a trailing slash in the route path is the best way to ensure
510510that both URLs work. Read the :doc: `/routing/redirect_trailing_slash ` article to
You can’t perform that action at this time.
0 commit comments