[wp-trac] [WordPress Trac] #42512: Domain with special character redirect loop on homepage
WordPress Trac
noreply at wordpress.org
Wed Mar 14 01:38:45 UTC 2018
#42512: Domain with special character redirect loop on homepage
-------------------------------+------------------------------
Reporter: stefan-niedermann | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Canonical | Version: 4.5
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------------+------------------------------
Changes (by dd32):
* keywords: => needs-patch
* component: General => Canonical
Comment:
Hey @stefan-niedermann Sorry for the length of time before this got a
reply, as I said on Github, we've got more open tickets than volunteer
time to manage them.
Just noting that this is indeed an issue when using UTF8 characters
directly in the URL. Using punycode encoded hostnames fixes this.
The issue is caused by a mis-match in how WordPress treats the hostname,
for example, the hostname that the browser sends for `http://centös/` is
`http://xn--cents-mua/`, those two strings don't match so WordPress will
redirect to `http://cent%C3%B6s/` as part of the canonical code.
This is triggered on the front-page when a static home-page is used, as we
set `$redirect_url` to `home_url('/')` assuming that it'll match
`$requested_url` and abort, but that doesn't happen in this scenario.
Short-term solution: Set the home/site url to punycode encoded domain
name.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42512#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list