Hello, how to use "rewrite" and "set" in nginx to use different robots.txt for different second-level domains. My idea: if ($server_name ~* XXX) { set secondlevel $2 } rewrite ^/robots.txt$ /robots-$secondlevel.txt last; Am I on the right way ? Could somebody help me with the regular expresion XXX ? Or is there another way ?