nginx rewrite rules
-
I have an MU which is now 3.0.1 and have just had to switch from Apache to Nginx to hopefully keep my memory usage in order and I downloaded the nginx Compatibility plugin and it comes with two, one for PHP4 and one for PHP5. When I try to activate the one for PHP5 I get
Plugin could not be activated because it triggered a fatal error.
Fatal error: Cannot redeclare class SjNginxCompat in
/wp-content/plugins/nginx-compatibility/nginx-compatibility.php
on line 12and I can’t figure out how to fix that.
Then I found this page
http://codex.wordpress.org/Installing_WPMU
and changed my rewrite rules in htaccess to this:
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}and that doesn’t fix anything either.
So I don’t know what to do now. Nothing I do seems to prevent my site from being anything but 404 pages.
- The topic ‘nginx rewrite rules’ is closed to new replies.