[wp-trac] [WordPress Trac] #11884: mod_rewrite optimization
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 10 01:17:55 UTC 2011
#11884: mod_rewrite optimization
-------------------------------+-----------------------
Reporter: Denis-de-Bernardy | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Optimization | Version: 3.0
Severity: normal | Resolution:
Keywords: close 2nd-opinion |
-------------------------------+-----------------------
Comment (by sivel):
The real concern here is that WordPress should be as least restrictive as
possible, and adding these rules defeats that.
In addition, if we begin adding excludes here, to what end do we do so?
There are hundreds of thousands of file types that people are going to
want excluded. I personally have the following list that I use for
caching purposes that is pulled from the allowed list of mime types that
WP uses for uploads plus some extras and minus a few:
{{{
jpg|jpeg|jpe|gif|png|bmp|tif|tiff|ico|asf|asx|wax|wmv|wmx|avi|divx|flv|mov|qt|mpeg|mpg|mpe|txt|asc|c|cc|h|csv|tsv|rtx|css|mp3|m4a|m4b|mp4|m4v|ra|ram|wav|ogg|oga|ogv|mid|midi|wma|mka|mkv|rtf|js|pdf|doc|docx|pot|pps|ppt|pptx|ppam|pptm|sldm|ppsm|potm|wri|xla|xls|xlsx|xlt|xlw|xlam|xlsb|xlsm|xltm|mdb|mpp|docm|dotm|pptx|sldx|ppsx|potx|xlsx|xltx|docx|dotx|onetoc|onetoc2|onetmp|onepkg|swf|class|tar|zip|gz|gzip|exe|odt|odp|ods|odg|odc|odb|odf|wp|wpd|diff|patch|sh|conf|xsl|bz2|dv
}}}
That totals 110 file types.
Then we start telling people, no we wont add that file extension, we then
make it easier to add them via a filter, at which point removing those
lines via a plugin can become more problematic using the mod_rewrite_rules
filter.
As another data point, afaik Drupal still uses basically the same rules we
do.
Working at a hosting company, one that hosts quite a lot of WP sites, I
have never seen these rewrites cause issues. For those people who are
concerned with performance in this aspect, you wouldn't want to have
.htaccess files enabled anyway, and would be placing this in your vhost
configuration, in which case you can do whatever you want since WordPress
isn't managing your mod_rewrite rules.
I still think it is better to implement the additional rules via a plugin,
and leave the mod_rewrite rules light.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11884#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list