Skip to content

Commit 3efacf8

Browse files
committed
minor #17439 [Framework] clearified base_uri behavior with extra examples (c33s)
This PR was submitted for the 6.2 branch but it was squashed and merged into the 5.4 branch instead. Discussion ---------- [Framework] clearified base_uri behavior with extra examples added some more examples with an extra directory depth. this should better document the behavior for the `base_uri` parameter in combination with the leading slash in the relative url. took some "reallife" url as example as `foo/bar/baz` wouldn't be so clear with only one letter difference between `bar` and `baz`. i only added one "foo" url and the urls with `api` in the path, the others rows are only changed because of the new intending. even if some of the examples are redundant i personally would keep them as the extra examples clearify the behavior. cost me quite some time to figure that out. hope this small addition helps people not to fall for the same. related to: symfony/symfony#39724 Commits ------- 97b942f [Framework] clearified base_uri behavior with extra examples
2 parents 4c0ceb7 + 97b942f commit 3efacf8

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

reference/configuration/framework.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -963,16 +963,21 @@ every request.
963963

964964
Here are some common examples of how ``base_uri`` merging works in practice:
965965

966-
======================= ================== ==========================
967-
``base_uri`` Relative URI Actual Requested URI
968-
======================= ================== ==========================
969-
http://example.org /bar http://example.org/bar
970-
http://example.org/foo /bar http://example.org/bar
971-
http://example.org/foo bar http://example.org/bar
972-
http://example.org/foo/ bar http://example.org/foo/bar
973-
http://example.org http://symfony.com http://symfony.com
974-
http://example.org/?bar bar http://example.org/bar
975-
======================= ================== ==========================
966+
========================== ================== ==========================
967+
``base_uri`` Relative URI Actual Requested URI
968+
========================== ================== ==========================
969+
http://example.org /bar http://example.org/bar
970+
http://example.org/foo /bar http://example.org/bar
971+
http://example.org/foo bar http://example.org/bar
972+
http://example.org/foo/ /bar http://example.org/bar
973+
http://example.org/foo/ bar http://example.org/foo/bar
974+
http://example.org http://symfony.com http://symfony.com
975+
http://example.org/?bar bar http://example.org/bar
976+
http://example.org/api/v4 /bar http://example.org/bar
977+
http://example.org/api/v4/ /bar http://example.org/bar
978+
http://example.org/api/v4 bar http://example.org/api/bar
979+
http://example.org/api/v4/ bar http://example.org/api/v4/bar
980+
========================== ================== ==========================
976981

977982
bindto
978983
......

0 commit comments

Comments
 (0)