[wp-trac] [WordPress Trac] #39679: Redirect loop on attachment pages
WordPress Trac
noreply at wordpress.org
Wed Sep 13 05:23:54 UTC 2017
#39679: Redirect loop on attachment pages
--------------------------+------------------------------
Reporter: OPunWide | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.7.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by geekysoft):
@OPunWide, somewhere in either WordPress or your server setting, you‘ve
inadvertently used upper case characters in your domain
(YourFriendPaul.com should be yourfriendpaul.com everywhere.) From your
server headers, it looks like it’s somewhere in WordPress’ configuration.
(The following header is produced by WordPress.)
Location: http://YourFriendPaul.com/wp/the-illusion-of-control.html
/placebo-like-icon
The infinite redirects here are caused by a WordPress bug when comparing
an upper-case domain to a lower-case domain. I’m trying to narrow down
exactly where this comparison takes place.
----
For my own situation, I have a reverse proxying server in front of
WordPress. Files are fetched from origin.example.com and served as
www.example.com. Every other WordPress page gets the correct
www.example.com page in every URL. However, for attachment pages there is
some strange URL magic going on in redirect_canonical() that reads the
server hostname from $_SERVER instead of WP_HOME. This is also a bug.
There are a lot of assumptions and mistakes in this code that differs from
the rest of Core.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39679#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list