Hello,
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.
Domain1.com
- robots file name robots-domain1.txt
- sitemap file name sitemap-domain1.xml
Domain2.com
- 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 http://domain1.com/robots.txt
Thanks & Regards,