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

WordPress Trac noreply at wordpress.org
Fri Nov 13 08:17:05 UTC 2015


#33821: redirect_canonical does not consider port in $compare_original
----------------------------------------+-----------------------------
 Reporter:  willshouse                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Canonical                   |     Version:  2.3
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by AbdealiJK):

 As previously mentioned in #34672 I find the following issue :

 I am able to open wp-admin and everything works well.
 When I open my home page, I get a redirect loop.
 On further investigation, it seems redirect_canonical() in wp-
 includes/canonical.php is the culprit. It finds the :

  - `$redirect_url` as 'http://localhost:80/ajk/' and
  - `$requested_url` as 'http://localhost/ajk/'

 And the extra `:80` causes the condition `$redirect_url == $requested_url`
 to be false - causing the infinite redirect.

 I tried the above patch for this issue, and it didn't seem to solve this
 issue.

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


More information about the wp-trac mailing list