Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Created July 1, 2014 01:55
Show Gist options
  • Save wokamoto/5b2097e5790ebbc1a4e4 to your computer and use it in GitHub Desktop.
Save wokamoto/5b2097e5790ebbc1a4e4 to your computer and use it in GitHub Desktop.
[WordPress] bogo ver.2.2 nginx rearite 対応パッチ
--- includes/rewrite.php.org 2014-07-01 10:51:03.000000000 +0900
+++ includes/rewrite.php 2014-07-01 10:51:50.000000000 +0900
@@ -38,7 +38,7 @@
$permastruct = $wp_rewrite->permalink_structure;
- if ( ! apache_mod_loaded( 'mod_rewrite', true ) && ! iis7_supports_permalinks() )
+ if ( ! got_url_rewrite() )
$permastruct = preg_replace( '#^/index\.php#', '/index.php/%lang%', $permastruct );
elseif ( is_multisite() && ! is_subdomain_install() && is_main_site() )
$permastruct = preg_replace( '#^/blog#', '/%lang%/blog', $permastruct );
@@ -513,4 +513,4 @@
return $post_rewrite;
}
-?>
\ No newline at end of file
+?>
@leanderlindahl
Copy link

This seems to do the job:

location / {
index index.php;
try_files $uri $uri/ /index.php$is_args$args;
}

https://wordpress.org/support/topic/bogo-on-nginx?replies=3#post-6453343

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