Skip to content

Instantly share code, notes, and snippets.

@ochoarobert1
Created July 11, 2023 12:48
Show Gist options
  • Save ochoarobert1/1a993cbccc750a92a7f5aa1475053963 to your computer and use it in GitHub Desktop.
Save ochoarobert1/1a993cbccc750a92a7f5aa1475053963 to your computer and use it in GitHub Desktop.
WordPress Multisite .htaccess bug on Nginx
# MULTISITE CONFIGURATION
if ( $uri ~ "files" ) {
rewrite ^/(?:.*/)?files/(.+) /wp-includes/ms-files.php?file=$1;
}
if (!-e $request_filename) {
rewrite ^/[_0-9a-zA-Z-]+(/wp-(content|admin|includes).*) $1 break;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment