• Hi Max,

    First of all, thanks for creating this very useful plug-in!

    It works as described except for one thing: If WordPress is installed in a subdirectory on the server, the .htaccess rewrite rules do not work properly (the files are not protected) because they do not contain the subdirectory path to /wp-content/uploads/.

    The .htaccess file looks like this (unneeded bits removed):

    # Media Vault Rewrite Rules
    RewriteRule ^wp-content/uploads(/_mediavault/.*\.\w+)$ index.php?mgjp_mv_file=$1 [QSA,L]
    RewriteCond %{QUERY_STRING} ^(?:.*&)?mgjp_mv_download=safeforce(?:&.*)?$
    RewriteRule ^wp-content/uploads(/.*\.\w+)$ index.php?mgjp_mv_file=$1 [QSA,L]
    # Media Vault Rewrite Rules End

    It should look like the following if WordPress is installed in a subdirectory called ‘core’:

    # Media Vault Rewrite Rules
    RewriteRule ^core/wp-content/uploads(/_mediavault/.*\.\w+)$ index.php?mgjp_mv_file=$1 [QSA,L]
    RewriteCond %{QUERY_STRING} ^(?:.*&)?mgjp_mv_download=safeforce(?:&.*)?$
    RewriteRule ^core/wp-content/uploads(/.*\.\w+)$ index.php?mgjp_mv_file=$1 [QSA,L]
    # Media Vault Rewrite Rules End

    It took a while to find and fix this, and I see that other users have also had this problem, so if the plug-in could automatically use the correct WP install subdirectory (if present) when it modifies the .htaccess file, it would make things easier.

    Thanks in advance for all your work and any help/response regarding this issue.

    https://ww.wp.xz.cn/plugins/media-vault/

The topic ‘.htaccess rules should include WP subdirectory’ is closed to new replies.