[wp-trac] [WordPress Trac] #33821: redirect_canonical does not consider port in $compare_original

WordPress Trac noreply at wordpress.org
Tue Jun 17 09:26:19 UTC 2025


#33821: redirect_canonical does not consider port in $compare_original
-------------------------------------------------+-------------------------
 Reporter:  willshouse                           |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Canonical                            |     Version:  2.3
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests changes-  |     Focuses:
  requested 2nd-opinion                          |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  has-patch needs-unit-tests changes-requested => has-patch
     needs-unit-tests changes-requested 2nd-opinion


Comment:

 @wojtekn OK, lets focus on one thing at a time. For now, we are trying to
 fix the HTTP part.

 For this reason, i dont think that using ngrok is ideal because of the
 HTTPS redirections that have been mixing everything up (unless you are
 also thinking on the http->https upgrade scenario)
 Anyway I find that upgrading from http->https is useless because you leave
 all assets without https, hence, they will not load for cross security
 troubles.

 This said, focusing on the HTTP part:
 If I use [https://theboroer.github.io/localtunnel-www/ the tunnel I
 suggested] I still, can't replicate the problem.

 I run `wordpress-develop` in port 8889 then setup

 {{{
 define( 'WP_SITEURL', 'http://strong-cases-smash.loca.lt' );
 define( 'WP_HOME', 'http://strong-cases-smash.loca.lt' );
 }}}

 And if I go into the browser http://strong-cases-smash.loca.lt, I can't
 really see any problems. I can browse all the pages without issues
 (without the patch)

 It's true that if I issue curl -I `http://localhost:8889`
 The Location is `localhost`

 But this is not affecting the WP site at all (unless you have spotted
 something failing because of this).

 **So this is my main question**: What is the concern of leaving the
 Location `localhost` if the site works well.

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


More information about the wp-trac mailing list