This issue is connected to the threads
rewrite to www EXCEPT for one directory
(http://www.ruby-forum.com/topic/4405551) and
Nginx location rule for Wordpress Multisite in subdirectories
(http://www.ruby-forum.com/topic/4405180)
After making the changes to my nginx.conf. I reloaded the config. After
going to example.com/blogs/wp-admin/install.php the browser still
redirected to www.example.com/blogs/wp-admin/install.php
Here are the applicable lines in the conf:
server {
server_name example.com;
listen 80;
location / {
return 301 http://www.example.com$request_uri;
}
location ^~ /blogs {
try_files $uri /blogs/index.php?q=$uri;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:10004;
}
}
if ($uri ~ (/blogs/[^/]*)) {
set $blogname $1;
}
location ^~ /blogs/$blogname {
try_files $uri $blogname/index.php?q=$uri;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:10004;
}
}
}
I'm wondering if it's an error in combining the config advice for the two
separate issues in the two threads.
Thanks.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx