[wp-trac] [WordPress Trac] #17048: URLs delivered to the browser should be root-relative

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 14 20:19:40 UTC 2011


#17048: URLs delivered to the browser should be root-relative
--------------------------+-----------------------
 Reporter:  dmole         |       Owner:  edwardw
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+-----------------------
Changes (by edwardw):

 * status:  closed => reopened
 * resolution:  maybelater =>


Comment:

 Replying to [comment:16 dmole]:
 > Replying to [comment:15 edwardw]:
 > > So what you are saying is that with ob_start you would break links to
 other posts in the post content and things like that as opposed to the
 dynamically generated part. What we do need is absolute URLs for RSS
 feeds, e-mail notifications and external non-browser URLs. For URLs served
 to the browser, then what we need is to serve URLs relative to the root
 specified in the database, with external URLs (email, RSS) served the
 "external" domain.
 > >
 > > Also, I see what you mean when you say that it might break e-mails if
 URLs are generated internally, since the domain that the insider sees is
 different from the outsider.
 > >
 >
 > yes that's the idea
 >
 > > Then why do you oppose me trying to find a solution to this problem? I
 think it would make WordPress more robust as a result, but I keep running
 into un-cooperative responses.
 >
 > It would be great if you could make a solution, I was just pointing out
 that your previous comment was on the wrong track; $_SERVER['HTTP_HOST' ]
 won't help at all (it won't hurt either), what would help is if we could
 make or find a central place where URLS are prefixed with "siteurl"+"home"
 and make it only use "home" if the URL is sent to a browser.

 Please see the sample proof-of-concept patch attached above? It is not
 perfect and only a first draft, but it implements the ideas from this
 topic and if it is on the right track then the patch can be refined and
 polished.

 Again, just trying to help find a solution for what seems to me a good
 idea.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17048#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list