[wp-trac] [WordPress Trac] #36737: Single site reachable on multiple subdomains always redirected to site_url

WordPress Trac noreply at wordpress.org
Fri Oct 5 15:29:26 UTC 2018


#36737: Single site reachable on multiple subdomains always redirected to site_url
-------------------------------------+------------------------------
 Reporter:  jsoft                    |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Canonical                |     Version:  4.5
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------

Comment (by siliconforks):

 Replying to [comment:2 SergeyBiryukov]:
 > That's the exact purpose of canonical redirects, I don't see a bug here.

 I was wondering about this myself - is it really the intention of
 `redirect_canonical` to redirect from ''any'' domain to the main domain?
 Because a comment in the implementation seems to contradict this:

 https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
 includes/canonical.php#L460

 The comment says: `Only redirect no-www <=> yes-www`.  Then the next few
 lines of code seem to be attempting to redirect only if the domains differ
 in having a `www.` prefix.  (But the code doesn't actually work because
 the logic is flawed.)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36737#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list