Support » Fixing WordPress » htaccess and /files/

  • 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
    </Limit>

    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.

Viewing 1 replies (of 1 total)
  • 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?

Viewing 1 replies (of 1 total)
  • The topic ‘htaccess and /files/’ is closed to new replies.