- Sold between 100 000 and 250 000 dollars
- Won a Competition
- Author was Featured
- Item was Featured
- Referred between 500 and 999 users
- Author had a Free File of the Month
- Author had a File in an Envato Bundle
- Bought between 10 and 49 items
I just noticed the following line in the .htaccess of a wp network install
... # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] ...
while i can understand the reasons behind such implementation, the above rule still causes a massive drop in server performances because all uploads are served via php (like timthumb)
a quick fix
RewriteCond %{HTTP_HOST} ^theme4\.themes\.domain.com$ [NC]
RewriteRule ^files/(.+) wp-content/blogs.dir/5/files/$1 [L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
where theme4.themes.domain.com is a site of the newtwork with siteID = 5 this way, uploads will be again served directly by the webserver.
I guess other theme authors here may use a newtwork installation for their previews so decided to share.
BF
- Attended a Community Meetup
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Most Wanted Bounty Winner
- Referred between 500 and 999 users
If it makes a significant improvement, you should submit this as a patch to WP core.
- Sold between 100 000 and 250 000 dollars
- Won a Competition
- Author was Featured
- Item was Featured
- Referred between 500 and 999 users
- Author had a Free File of the Month
- Author had a File in an Envato Bundle
- Bought between 10 and 49 items
mordauk said
If it makes a significant improvement, you should submit this as a patch to WP core.
as i said, there are reason for that – for example, the php file checks
if ( $current_blog->archived == '1' || $current_blog->spam == '1' || $current_blog->deleted == '1' ) {
status_header( 404 );
die( '404 — File not found.' );
}
the above wouldn’t be possible without using ms-files.php. However, such feature is not needed when the network is only used for theme preview, hence the quick hack.
BF
