wordpress rewrite nginx
Anonymous Coward
magasesti at gmail.com
Tue Feb 13 15:49:12 MSK 2007
Thank you Scott,
I tried your setting but it only works for last part of the rules i t hink
(equivalent to apache rules that i wrote earlier) and the posts show but the
design is scrambled (missing images/colors/etc) so i suppose i need more
then just what you suggested.
So...anybody else that is using WordpressMu or knows how to translate those
rules for nginx?
On 2/13/07, Scott Yang <scott.yang at gmail.com> wrote:
>
> This is what I have (works for WordPress 2.0/2.1)
>
> if (!-e $request_filename) {
> rewrite ^/.*$ /index.php last;
> }
>
> Put that inside server { ... }
>
> --Scott
>
> On 2/13/07, Anonymous Coward <magasesti at gmail.com> wrote:
> > i installed Wordpress today on nginx and everything seems ok except one
> > "small" issue, i don't know how to convert the rewrite rules.
> > So if anybody has any experience or knows how to do it i'd be gratefull
> > cause they have only Apache examples :(
> >
> >
> > RewriteEngine On
> > RewriteBase /
> >
> > # Rewrite www.domain.com to domain.com
> > RewriteCond %{HTTP_HOST} ^www\.(.*)
> > RewriteRule ^(.*) http://%1/$1 [R,L]
> >
> > #uploaded files
> > RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]
> >
> > RewriteCond %{REQUEST_FILENAME} -f [OR]
> > RewriteCond %{REQUEST_FILENAME} -d
> > RewriteRule . - [L]
> > RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
> > RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
> > RewriteRule . index.php [L]
> >
> >
> >
> > Thank you.
>
>
> --
> Scott Yang <scott.yang at gmail.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070213/29a40153/attachment.html>
More information about the nginx
mailing list