Quick question

mike mike503 at gmail.com
Wed Mar 18 22:49:28 MSK 2009


2009/3/18 Igor Sysoev <is at rambler-co.ru>:

> However, it's better to runs these rewrites under
>
>      location /sites/foo/ {
>           rewrite  ^/sites/foo/index.php$ http://foo.com/ permanent;
>           return   404;
>      }
>
>      location /sites/coolsw {
>           rewrite  ^/sites/coolsw(|/)$ http://foo.com/ permanent;
>      }

ahh, duh. this works perfect. i had another rewrite i had missed that
was messing things up:

location /sites/foo {
        rewrite ^/sites/foo/index.php$ http://foo.com/permanent;
        rewrite ^/sites/foo(|/)$ http://foo.com/permanent;
        return 404;
}

Thanks!





More information about the nginx mailing list