Rewrite Rule NGINX


I need help to set rewrite rule in nginx. Can anyone help me to set following rule in nginx? I have 2 files. Robots.txt and sitemap.xml that i need to rewrite. I have 2 domains both pointing to same server location having different sitemap file and robots.txt.

- robots file name robots-domain1.txt
- sitemap file name sitemap-domain1.xml

- robots file name robots-domain2.txt
- sitemap file name sitemap-domain2.xml

Now what i want to do is I need a rewrite rule that will show me robots-domain1.txt if i goes to

Thanks & Regards,

These forums are specifically for the Omeka application, which utilizes Apache. You'll probably have better luck asking your question on a forum devoted to NGINX or on Stack Overflow.