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

WordPress Trac noreply at wordpress.org
Mon Jun 16 11:48:55 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                                      |
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Replying to [comment:35 wojtekn]:
 > @SirLouen thanks for sharing the detailed steps. The difference I see
 between those and mine is that I have used non-SSL, and in your case, you
 used SSL. Could you try without SSL?

 I've also tried with HTTP, things are very different

 In this case issuing:

 `ngrok http 8889`
 It creates the following tunnel URL (which is HTTPS always, by default)
 https://d4d5-80-102-99-22.ngrok-free.app/wp-admin/

 Problem with `ngrok-free.app` is that the HSTS forces https by default.
 And as I told you, the protocol is not upgrading, only the URL

 So when I go into https://d4d5-80-102-99-22.ngrok-free.app/wp-admin/

 It will create an infinite loop. With your patch and without your patch.
 [https://www.redirect-checker.org/index.php You can check such infinite
 loop here]

 If I had access to `ngrok.pizza` which doesn't have HSTS policies, I could
 test going into
 http://d4d5-80-102-99-22.ngrok.pizza/wp-admin/

 To check how it goes.

 So as [https://core.trac.wordpress.org/ticket/33821?replyto=35#comment:30
 I told you here], I think that the redirects are not because of the
 trouble with the host, but because of the protocol redirection (and as I
 say, your [https://github.com/WordPress/wordpress-develop/pull/8977 PR
 8977] is not solvingthis for me

 PS: Remember you can test [https://github.com/WordPress/wordpress-develop
 wordpress-develop] by yourself and see what I'm seeing and tell me your
 experience. I know that you are maintaining WordPress Studio, but we might
 have to settle a middle ground here for tests.

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


More information about the wp-trac mailing list