Need help to set rewrite rule in nginx
May 11, 2016 10:17AM

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,
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready