Rewrite issues

Victor Iggy lists at ruby-forum.com
Mon Jun 9 22:46:31 MSD 2008


I am trying to redirect users to an upgrade page when there is an
"upgrade" file in the location block location. However it seems that it
is not picking up on it.

Here is the configuration.
location / {
  if (-f upgrade) {
                rewrite ^(.*)
http://media.fabulously40.com/upgrading.html last;
 }
... redirect to proxy configuration below ...
}

This should work no? if "upgrade" file exists rewrite the request.

Am I missing something here...

-Victor
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list