Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Open
Description
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