A Bug

Igor Sysoev igor at sysoev.ru
Wed Dec 8 10:38:30 MSK 2010


On Tue, Dec 07, 2010 at 04:39:32PM -0500, f3zz wrote:

> I redirect the *.yanbao360.com to www.yanbao360.com use the
> configuration below.
> 
> [quote]
> location / {
>         if ($host != 'www.yanbao360.com') {
>                 rewrite ^(.*)$ http://www.yanbao360.com$1;
>         }
> }
> [/quote]
> 
> everything is ok except three case return 200 not 302

Apart Maxim's technical explantaion, you should use:
http://nginx.org/en/docs/http/converting_rewrite_rules.html


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list