Skip to content

Instantly share code, notes, and snippets.

@sftsk
Last active May 21, 2024 14:33
Show Gist options
  • 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;
}
@MatthewRorke
Copy link

The most underrated file on the internet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment