homepage Welcome to WebmasterWorld Guest from 54.204.94.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
rewriting robots.txt
piconsulting




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

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

 

piconsulting




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

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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved