Created
July 1, 2014 01:55
-
-
Save wokamoto/5b2097e5790ebbc1a4e4 to your computer and use it in GitHub Desktop.
[WordPress] bogo ver.2.2 nginx rearite 対応パッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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 | |
+?> |
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
Hi wokamoto. I'm trying to get my wordpress site working with bogo and nginx and have applied your patch, but my guess is I have to do something with 'location' in the server block as well. This is what I'm using – would you have any tips?