htaccess and /files/ (2 posts)

  1. tirussell
    Posted 5 years ago #

    I need an htaccess guru!

    I'd like to create a special case that comes before/modifies the standard .htaccess line from a multisite install

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    with an an AuthType call to protect a certain directory, using the standard

    AuthUserFile /path/to/passwd
    AuthName "Password Protected"
    AuthType Basic
    <Limit GET POST>
    require user USERNAME

    Doable? The goal is to re-enable the usual apache <Limit> functionality which the first code snippet above circumvents. i.e., an .htaccess file in a blogs.dir/#/files directory is currently ignored.

  2. tirussell
    Posted 5 years ago #

    As a potential workaround, are there any hooks for affecting how ms-files.php works? Is there a way to, in my functions.php file, tell that script not to function for certain blogs or for certain URL patterns?

Topic Closed

This topic has been closed to new replies.

About this Topic