Hi all, I'm newer to start to deploy the Nginx service in our company test farm, currently the rewrite rules torched me for almost 1 week. Appreciated if any one of you could give me hint or answers on the issue as blow:
1. We have seperate the reqrite configuration from apache configuration file called "rewrite.conf" and with the records as below:
RewriteCond %{DOCUMENT_ROOT}/sitedown.txt -f
RewriteCond %{REQUEST_FILENAME} !.*downtime.*
RewriteRule $ http://nginxtest.cn.xxx.com/downtime/index.html [R=307,L]
The rewrite rule will detect if a file called "sitedown.txt" under document_root folder and if any one tried to visit the site will be redirected to the maintenance page, I have no idea on how to configure the same thing on Nginx because the Nginx doesn't support if (conditon1 .&& condition2){rewrite .......}