Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] Route not found when URIs contains subdomain (virtualhosts) #39882

Copy link
Copy link
Closed
@BafS

Description

@BafS
Issue body actions

Symfony version(s) affected: ^5.1.9

Description

#38614 introduce a BC when using URL rewriting and that the URI contains the same string as the subdomain.

How to reproduce

  1. Setup URL rewriting from domain.com/index.php/api to api.domain.com
  2. Add a route containing /api/ (for example @Route("/foo/api/bar"))
  3. Go to api.domain.com/foo/api/bar, you will have a 404

Possible Solution

Change the if in the PR to not change $basename when the URI contains the subdomain where strpos !== 0, basically revert the PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.