[wp-trac] [WordPress Trac] #20746: Accessing non-existing theme folder in Network install gives 500 error
    WordPress Trac 
    noreply at wordpress.org
       
    Wed Sep 30 02:59:37 UTC 2015
    
    
  
#20746: Accessing non-existing theme folder in Network install gives 500 error
---------------------------------------+-----------------------------
 Reporter:  arkimedia                  |       Owner:
     Type:  defect (bug)               |      Status:  reopened
 Priority:  normal                     |   Milestone:  Future Release
Component:  Rewrite Rules              |     Version:  3.3.2
 Severity:  normal                     |  Resolution:
 Keywords:  needs-testing needs-patch  |     Focuses:  multisite
---------------------------------------+-----------------------------
Comment (by conner_bw):
 Ok. I messed around with this. I think I have something.
 Instead of changing the rewrite rules, Change:
 {{{
     RewriteCond %{REQUEST_FILENAME} -f [OR]
     RewriteCond %{REQUEST_FILENAME} -d
     RewriteRule ^ - [L]
 }}}
 To:
 {{{
     RewriteCond %{ENV:REDIRECT_STATUS} 200 [OR]
     RewriteCond %{REQUEST_FILENAME} -f [OR]
     RewriteCond %{REQUEST_FILENAME} -d
     RewriteRule ^ - [L]
 }}}
 This works by checking internal Apache variable %{ENV:REDIRECT_STATUS}.
 This variable is empty at the start of rewrite module but is set to 200
 when first successful internal rewrite happens. This above condition says
 bail out of further rewrites after first successful rewrite and stops
 looping.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20746#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list