I have the following two domains:
example.com
test.example.com
Both point to same folder which is public_html
. What I want is a different robots.txt
file for each domain. So when someone browse example.com/robots.txt
then a different file is shown. And when someone go to test.example.com/robots.txt
then a different file is shown.
How can I do this using URL rewriting in .htaccess
?