Skip to content

Instantly share code, notes, and snippets.

@BenFausch
Created February 21, 2019 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenFausch/c34d3a2dcfbca7b8bf147f92d59c9491 to your computer and use it in GitHub Desktop.
Save BenFausch/c34d3a2dcfbca7b8bf147f92d59c9491 to your computer and use it in GitHub Desktop.
.htaccess for wp multisite
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 ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment