[wp-trac] [WordPress Trac] #16932: Media Upload top navigation producing wrong URLs when WordPress is run behind a ReverseProxy

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 22 12:22:46 UTC 2011


#16932: Media Upload top navigation producing wrong URLs when WordPress is run
behind a ReverseProxy
----------------------------+-----------------------------
 Reporter:  tploch          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.1
 Severity:  normal          |   Keywords:
----------------------------+-----------------------------
 The following scenario is in place:

 WordPress v3.1 is running on http://example.com. Since the target server
 is handling very sensitive data, WordPress is integrated into another site
 ( http://othersite.com/blog ) via a mod_rewrite ReverseProxy Directive:

 {{{
 RewriteEngine On
 RewriteRule blog(.*) http://example.com$1 [P]
 }}}

 Both WordPress and Blog URLs are set to 'http://othersite.com/blog'.

 Now when creating a new article and using the top ajax link to upload an
 image, the resulting iframe has a top navigation that now shows following
 (absolute) href attribute:

 '/wp-admin/media-upload.php?post_id=1116&type=image&tab=type'

 This will fail in my scenario, since the browser would translate that to
 'http://othersite.com/wp-admin/media-
 upload.php?post_id=1116&type=image&tab=type' while the correct URL should
 be 'http://othersite.com/blog/wp-admin/media-
 upload.php?post_id=1116&type=image&tab=type'.

 I think prepending the link with the configuration blog URL should fix
 this, and I tried to do this, but unfortunately I am not that skilled to
 pinpoint the location of this matter.

 Thanks in advance to take this into consideration.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16932>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list