Support » Networking WordPress » Exclude folder – htaccess

  • Resolved Eugene Kopich

    (@web2033)



    Hi!

    I need to exclude 1 folder (and all subfolders and files inside) in the root, say “folder” so it works without WP.
    I have subdirectories based Network with standard .htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    What’s missing here? Because subfolders are still shown by WP…

    RewriteEngine On
    RewriteBase /
    RewriteRule ^/folder($|/) - [L] 
    RewriteRule ^index\.php$ - [L]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude folder – htaccess’ is closed to new replies.