[wp-trac] [WordPress Trac] #13021: Function got_mod_rewrite brakes nginx, lightttpd, cherokee rewrite rules (causes infinite loop redirection)

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 18 17:00:10 UTC 2010


#13021: Function got_mod_rewrite brakes nginx, lightttpd, cherokee rewrite rules
(causes infinite loop redirection)
--------------------------+-------------------------------------------------
 Reporter:  dz0ny         |       Owner:  ryan                   
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  3.0                    
Component:  Permalinks    |     Version:  3.0                    
 Severity:  normal        |    Keywords:  reporter-feedback close
--------------------------+-------------------------------------------------
Changes (by sivel):

 * cc: matt@… (added)
  * keywords:  reporter-feedback => reporter-feedback close
  * severity:  major => normal
  * priority:  high => normal


Comment:

 I have never experienced any problems with this, and have been running my
 site on nginx for over 2 years.  I have tested using the rewrite that you
 listed, I have tried removing the checks if the $request_filename exists,
 and no matter what I haven't been able to duplicate.

 I have used both:

 {{{
 if (!-e $request_filename) {
     rewrite . /index.php last;
 }
 }}}

 and
 {{{
 if (!-e $request_filename) {
     rewrite ^(.*)$ /index.php?q=$1 last;
 }
 }}}

 I have since added the very filter that nacin mentioned so that it does
 not include the index.php.

 In addition we try to use filters for things such as this.  I am -1 for a
 constant.

 I am also -1 for rewriting the detection functions.  The detection
 function works the way that it does so that it can without a doubt
 determine that rewriting is enabled.  nginx and lighttpd as well as many
 others can be compiled without rewrite functionality.  In addition
 rewrites for such servers also requires modification to the server config,
 and you cannot assume that a user will have access to it.

 If you want to give a user the option to choose whether he/she is using
 custom rewrite rules, I feel that is plugin territory.  In general if you
 think we should add another option to the admin, the rule of thumb is
 generally that it shouldn't go into core but be implemented as a plugin.

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


More information about the wp-trac mailing list