[wp-trac] Re: [WordPress Trac] #5089: Canonical Redirect causes continual 301 redirect loop

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 1 14:18:38 GMT 2007


#5089: Canonical Redirect causes continual 301 redirect loop
--------------------------+-------------------------------------------------
 Reporter:  wcraigtrader  |        Owner:  markjaquith
     Type:  defect        |       Status:  new        
 Priority:  normal        |    Milestone:  2.5        
Component:  General       |      Version:  2.3        
 Severity:  major         |   Resolution:             
 Keywords:  redirect      |  
--------------------------+-------------------------------------------------
Comment (by wcraigtrader):

 I tried this, and it almost worked -- you missed a step:

  1. External /etc/hosts :: Add <<Internal IP>> <<External Name>>
  1. External httpd.conf :: Change ProxyPass / ProxyPassReverse to
 <<Internal Name>>
  1. Internal httpd.conf :: Add <<External Name>> to ServerAlias list

 That said, I really don't like this solution because it needs to be done
 for every hosted website AND it's harder to debug.  For example, if I'm
 sitting on the external host, trying to debug the redirection (eg: with
 curl), the curl options go from

 {{{
 curl -v -I http://ludus.unicornsrest.org/
 }}}

 to

 {{{
 curl -v -I -H 'Server: ludus.unicornsrest.org' http://localhost/
 }}}

 AND it still doesn't work because in this case the external Apache doesn't
 seem to redirect to the right address (I think it's dropping the Server:
 header).

 I think at this point that it's still a bug in the Canonical Redirect
 filter (since all it needs to do to break the redirect loop is recognize
 when it generates the same URL as it was originally passed and do nothing)
 and leave it disabled.

 Thanks for your help; let me know when you fix the bug.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5089#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list