Nginx rewrite host

Kingsley Foreman kingsley at internode.com.au
Wed Feb 11 11:26:09 MSK 2009


                if ($host != blah.com){
                        rewrite  ^(.*)$ http://blah.com$1 break;
                }




From: Glen Lumanau 
Sent: Wednesday, February 11, 2009 3:14 PM
To: nginx at sysoev.ru 
Subject: Nginx rewrite host


Hello!

 

How can I create this rule

If host = 127.0.0.1, 127.0.0.2

Do nothing

 

If host != 127.0.0.1, 127.0.0.2

Rewrite bla bla bla

 

Thank you for any help

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090211/e2580657/attachment.html>


More information about the nginx mailing list