map v/s rewrite performance

rahul286 nginx-forum at nginx.us
Fri Apr 4 12:05:04 UTC 2014


@Igor

Few Updates:

> location = old-url-1 { return 301 new-url-1; }

is really nice. We can specify 301/302 using it.

But I am reading -
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_valid
and now I am thining weather to populate config file with 1000's of lines
like below (using automated script, no human efforts involved)

> location = old-url-1 { return 301 new-url-1; }

OR simply declare

> fastcgi_cache_valid 301 302      max;

That is: Putting load in config file v/s fastcgi-cache?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,248659,248994#msg-248994



More information about the nginx mailing list