Welcome to WebmasterWorld Guest from 54.198.46.95

Forum Moderators: ocean10000

Message Too Old, No Replies

rewriting robots.txt

     
10:17 pm on Jan 5, 2007 (gmt 0)

10+ Year Member



I have a .net app which serves 4 sites and am now in need of 4 different robots.txt files for each site. I'm currently using isapi_rewrite and tried to set up a rule for this, but it failed. Here's what I wrote:

RewriteCond Host: ^mysite\.com
ReWriteRule robots\.txt robots_td.txt [I,O,L,RP]

When I try this I still get the original robots.txt displaying in the browser.

Does anyone have any clues why this isn't working?

Are there any other possible workarounds?

thanks

5:26 pm on Jan 8, 2007 (gmt 0)

10+ Year Member



Well it looks like I had some syntax issues in the rule, here's the correct version in case anyone else is interested:

RewriteCond Host: myfirstsite\.com
RewriteRule /robots\.txt /robots_1st.txt [I,O]
RewriteCond Host: mysecondsite\.com
RewriteRule /robots\.txt /robots_2nd.txt [I,O]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month