On 10/25/10 11:05, Igor Janevski wrote:
> Hi, I cannot find anywhere an answer to the following rather simple question .
>
> How can i make a temporary (307) redirect using nginx.
>
> For example i want to have this:
>
> set $optika PUBLICIP;
> if ($host != $optika) {
> rewrite ^/(.*)$ http://$optika/$1 redirect;
> break;
> }
rewrite ... redirect
return http 302 and it is temporary redirect.
From RFC:
10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the
redirection might be altered on occasion, the client SHOULD continue to use the
Request-URI for future requests. This response is only cacheable if indicated by
a Cache-Control or Expires header field.
Why you need http 307?
--
Anton Yuzhaninov
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx