Welcome! Log In Create A New Profile

Advanced

Re: Temporary Redirect 307

Anton Yuzhaninov
October 25, 2010 03:26AM
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
Subject Author Posted

Temporary Redirect 307

Igor Janevski October 25, 2010 03:14AM

Re: Temporary Redirect 307

Anton Yuzhaninov October 25, 2010 03:26AM

Re: Temporary Redirect 307

Nicholas Sherlock October 25, 2010 05:52AM

Re: Temporary Redirect 307

Igor Janevski October 25, 2010 05:56AM

Re: Temporary Redirect 307

Nicholas Sherlock October 25, 2010 06:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready