8000 Redirect with trailing slash · Issue #29477 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Redirect with trailing slash #29477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aivchen opened this issue Dec 5, 2018 · 3 comments
Closed

Redirect with trailing slash #29477

aivchen opened this issue Dec 5, 2018 · 3 comments

Comments

@aivchen
Copy link
aivchen commented Dec 5, 2018

Symfony version(s) affected: 4.1.8, 4.2.0

Description
I have 2 configured routes:
/foo
/foo/
The aim is to return 200 code in both cases.
Also from documentation:

If your application defines different routes for each path (/foo and /foo/) this automatic redirection doesn't take place and the right route is always matched.

But since update to 4.1.8 or 4.2.0 one of them returns 301 redirect to another one.

How to reproduce
My Yaml config:

foo:
  path: /foo/
  controller: App\Controller\MyController::action
foo_2:
  path: /foo
  controller: App\Controller\MyController::action
@Tobion
Copy link
Contributor
Tobion commented Dec 6, 2018

Ref. #29287

@nicolas-grekas
Copy link
Member
nicolas-grekas commented Dec 6, 2018

Trailing slash is non significant. That was a bug actually that is now fixed. Please upgrade to latest version to get the correct and historical behavior.

@aivchen aivchen closed this as completed Dec 7, 2018
@nicolas-grekas
Copy link
Member

Please open a doc PR if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0