Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#12496 closed feature request (duplicate)

blog.dir should not require the use of php to serve large files

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

On MS installs, files are uploaded to:

blog.dir/site_id/files/path/file.ext

We then use a rewrite rule to pass these things through WP, which uses php to read the file. in addition to introducing performance problems with large files (as anyone who wrote an access-restriction script knows all too well), this makes absolutely no sense.

a much more rational approach to do the same thing would upload them in:

blog.dir/site_host[/base_dir]/path/file.ext

we could then use a simple rewrite rule to serve the files without even loading php, i.e.:

RewriteRule /files/ /wp-content/files/%{HTTP_HOST}%{REQUEST_URI} [L]

... with the additional benefit of being able to add .htaccess files and the like in individual blog folders.

Attachments (1)

12496.diff (3.2 KB) - added by Denis-de-Bernardy 15 years ago.

Download all attachments as: .zip

Change History (6)

#1 @Denis-de-Bernardy
15 years ago

  • Keywords has-patch added

#2 @wpmuguru
15 years ago

That isn't compatible with existing installs.

#3 @nacin
15 years ago

  • Milestone changed from 3.0 to Future Release
  • Type changed from defect (bug) to feature request

#4 @wpmuguru
12 years ago

  • Keywords close added

This was more or less addressed by #19235. Recommending close.

#5 @SergeyBiryukov
12 years ago

  • Keywords close removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19235.

Note: See TracTickets for help on using tickets.