Skip to content

Instantly share code, notes, and snippets.

@sftsk
Last active June 21, 2022 11:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sftsk/725827262ed52a6a129c3ec4ef9e121e to your computer and use it in GitHub Desktop.
Save sftsk/725827262ed52a6a129c3ec4ef9e121e to your computer and use it in GitHub Desktop.
fix nginx multisite redirect loop using roots/bedrock
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) /wp$2 last;
rewrite ^(/[^/]+)?(/.*\.php) /wp$2 last;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment