Welcome! Log In Create A New Profile

Advanced

Re: WordPress MU rewrite rules

October 08, 2009 10:46AM
I can not fix it, this is my actual setup, i tried everything I found on google

server{
listen *:80;
server_name subdomain.domain.com;
root /xx/xxx/xxxx/;
index index.php index.html index.htm;

#necessary if using a multi-site plugin
server_name_in_redirect off;
#necessary if running Nginx behind a reverse-proxy
port_in_redirect off;

# This will reject all external requests for files with names beginning with . (dot).
location ~ /\. {
deny all;
}

#mod rewrite wordpress

rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}

#Proxy the PHP scripts to Apache listening on 127.0.0.1:8080
location ~ \.php$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;
}
}


server_name_in_redirect off; and port_in_redirect off; directives have not helped

The result is:

- All resquests loads index (blogs planet)
- Images of blogs generates 404....

I have analyzed this last a bit, and the problem is that for example:

http://subdomain.domain.com/[b]userblog[/b]/files/2008/04/image.jpg == http://subdomain.domain.com/wp-content/blogs.php?file=2008/04/image.jpg

the result is -> 404 — File not found.

because do not select fine the id of the blog, id take it out of the database according to userblog, isn´t it? in that case '/userblog/' lost when apply the rewrite rule!!

http://subdomain.domain.com/wp-content/blogs.dir/ correct [b]IdBlog[/b] is [b]2[/b] to this userblog but always is [b]1[/b] /files/2008/04/image.jpg

I'm going crazy, please help!
Subject Author Posted

WordPress MU rewrite rules

pepejose September 22, 2009 04:52AM

Re: WordPress MU rewrite rules

pepejose October 08, 2009 10:46AM

Re: WordPress MU rewrite rules

Grzegorz Sienko October 08, 2009 03:42PM

Re: WordPress MU rewrite rules

edogawaconan October 08, 2009 11:04PM

Re: WordPress MU rewrite rules

pepejose October 09, 2009 03:14AM

Re: WordPress MU rewrite rules

edogawaconan October 09, 2009 02:36PM

Re: WordPress MU rewrite rules

Daniele Melosi October 20, 2009 10:10AM

Re: WordPress MU rewrite rules

edogawaconan October 20, 2009 10:54AM

Re: WordPress MU rewrite rules

Daniele Melosi October 21, 2009 04:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 193
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready