Different robots.txt for two different domains point to same folder

Posted by Ali on Pro Webmasters See other posts from Pro Webmasters or by Ali
Published on 2011-03-15T06:29:29Z Indexed on 2011/03/15 16:19 UTC
Read the original article Hit count: 347

Filed under:
|
|

Hi,

I have the following two domains:

domain.com

test.domain.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 domain.com/robots.txt then a different file is shown. And when someone go to test.domain.com/robots.txt then a different file is shown. How can I do this using URL rewriting in .htacces?

Thanks

© Pro Webmasters or respective owner

Related posts about url-rewriting

Related posts about domain