miksco

.htaccess WordPress MultiSite with subdirectory

Oct 1st, 2022
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. RewriteEngine On
  2. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  3. RewriteBase /
  4. RewriteRule ^index\.php$ - [L]
  5.  
  6. # add a trailing slash to /wp-admin
  7. RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
  8.  
  9. RewriteCond %{REQUEST_FILENAME} -f [OR]
  10. RewriteCond %{REQUEST_FILENAME} -d
  11. RewriteRule ^ - [L]
  12. RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
  13. RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
  14. RewriteRule . index.php [L]
Add Comment
Please, Sign In to add comment