Skip to content

Instantly share code, notes, and snippets.

@BjornW
Created December 15, 2017 10:03
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 BjornW/a77903b00977c1e27d5dc29f50895036 to your computer and use it in GitHub Desktop.
Save BjornW/a77903b00977c1e27d5dc29f50895036 to your computer and use it in GitHub Desktop.
Rewrite rules for WordPress Multisite (4.9.1) with Nginx used in BD
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
## See also:
## https://easyengine.io/wordpress-nginx/tutorials/multisite/subdirectories/minimal/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment