You have a redirect loop due to these rules.
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) /app/$2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ /app/$2 [L]
Actually, you should keep in mind that your rules are evaluated even after rewriting. Thus, if you have /something/wp-xxx/yyy/zzz , it will be internally rewritten to /app/wp-xxx/yyy/zzz . But now, as you can see, your rule will again match the new uri /app/wp-xxx/yyy/zzz .
Proof looking at your magazines
applying pattern '^([_0-9a-zA-Z-]+/)?(wp-.*)' to uri 'wp-admin/network/options.php', rewrite 'wp-admin/network/options.php' -> '/app/wp-admin/network/options.php',
Then you have
applying pattern '^([_0-9a-zA-Z-]+/)?(wp-.*)' to uri 'app/wp-admin/network/options.php', rewrite 'app/wp-admin/network/options.php' -> '/app/wp-admin/network/options.php',
And it goes on and on ... to the limit of 10 redirects
To avoid this behavior, you need to add some restrictions to your rules to make sure that they will not be evaluated when they do not need it. A simple workaround would be to use a negative lookahead pattern to make sure the current request does not start with /app/ before rewriting it:
RewriteRule ^((?!app/)[^/]+/)?(wp-.+)$ /app/$2 [L]
Finally, your htaccess might look like this:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] # Rule 1 RewriteRule ^([^/]+/)?files/(.+)$ wp-includes/ms-files.php?file=$2 [L] # Rule 2 RewriteRule ^((?!app/)[^/]+/)?(wp-.+)$ /app/$2 [L,QSA] # Rule 3 RewriteRule ^((?!app/)[^/]+/)?(.+\.php)$ /app/$2 [L,QSA] RewriteRule ^ index.php [L] Options -Indexes </IfModule> # END WordPress
Reminder: 3 rules are executed only for non-existent files / folders.
Examples:
http://domain.tld/files/something or http://domain.tld/xxx/files/something will be internally rewritten before /wp-includes/ms-files.php?file=something thanks to rule 1http://domain.tld/wp-something/somethingelse or http://domain.tld/xxx/wp-something/somethingelse (where xxx can be anything but an app ) will be internally rewritten to /app/wp-something/somethingelse thanks to rule 2http://domain.tld/file.php or http://domain.tld/xxx/file.php (where xxx can be anything but an app ) will be internally rewritten to /app/file.php thanks to rule 3