WordPress.org

Ready to get started?Download WordPress

Forums

Media Vault
Multisite over NGINX configuration (2 posts)

  1. aluiest
    Member
    Posted 10 months ago #

    Hello,

    I'm testing your plugin but i'm in a multisite environment over nginx server, that can't understand .htaccess files.

    Can you help me with rewrite rules to redirect statically file access to your plugin??

    Thank's a lot.

    http://wordpress.org/plugins/media-vault/

  2. Max GJ Panas
    Member
    Plugin Author

    Posted 9 months ago #

    Hey, I just wanted to say I am looking into it. I do not have an nginx setup to test on right now, but I will do my best.

    In the meantime if it helps, the .htaccess rewrite rules you will need to recreate, in addition to WordPress's, in nginx are similar to the following (they may differ slightly depending on your set-up):

    This line sends all file requests in the Media Vault protected folder (currently hardcoded to: '_mediavault') through WP so that the plugin can evaluate them.

    RewriteRule ^wp-content/uploads(/_mediavault/.*\.\w+)$ /?mgjp_mv_file=$1 [QSA,L]

    These two lines detect the 'mgjp_mv_download=safeforce' URL query parameter which is used to send file requests from within the wp uploads dir through a php script to force the browser to download the file.

    RewriteCond %{QUERY_STRING} ^(?:.*&)?mgjp_mv_download=safeforce(?:&.*)?$
    RewriteRule ^wp-content/uploads(.*\.\w+)$ /?mgjp_mv_file=$1 [QSA,L]

    Also if you want to have a look at the function which builds the .htaccess rules in Media Vault 0.8 here it is.

    I will try and get back to you with more as soon as possible.

Reply

You must log in to post.

About this Plugin

About this Topic