[wp-trac] [WordPress Trac] #11845: mod_rewrite Should Not Be Used to Check Existence of index.php

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 9 17:18:55 UTC 2010


#11845: mod_rewrite Should Not Be Used to Check Existence of index.php
--------------------------+-------------------------------------------------
 Reporter:  miqrogroove   |       Owner:     
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  3.0
Component:  Optimization  |     Version:     
 Severity:  major         |    Keywords:     
--------------------------+-------------------------------------------------
 There's a great optimization thread going on at
 http://www.webmasterworld.com/apache/4053973.htm

 I doubt all or even most of the recommendations would be universally
 compatible, but one thing did jump out at me about this:

 {{{
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 }}}

 Needs to be changed to:

 {{{
 RewriteRule ^index\.php$ - [S=1]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 }}}

 Without that change, the internal re-write of index.php after [L] has to
 run through the !-f and !-d conditions, which are supposedly expensive.

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


More information about the wp-trac mailing list