Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Routing] Output IDN domains instead of punycode forUrlGeneratorInterface::ABSOLUTE_URL #54825

Open
@ThomasLandauer

Description

@ThomasLandauer

Description

I have an IDN domain (e.g.exämple.com) with nginx.

  • When I put the punycode domain in nginx config (server_name xn--...), as recommended athttp://nginx.org/en/docs/http/server_names.html#idn then$router->generate(..., ..., UrlGeneratorInterface::ABSOLUTE_URL); outputs the punycode url:ttps://xn--...
  • When I put the IDN in nginx config (server_name exämple.com), then routing isn't working at all and I get the "Welcome to Symfony 7" page.

Internally, the router is usingRequest::getHost(), which uses PHP's$_SERVER['SERVER_NAME'].

So I'm suggesting to run absolute URL's throughidn_to_utf8() by default, or add a flag for that. Nobody who has an IDN domain wants to show the punycode version to the users ;-)

Or am I missing something here?

Example

No response

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp