This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Rewite for robots.txt by subdomain
Message |

Joined: 05 November 2008
Posts: 5
Posted: 31 August 2010 at 9:19am

Hi there,

I have an IIS6 hosted site using ISAPI_Rewrite 2.8 that contains a number of subdomains, all pointing to the same directory/ codebase on the server (different content is served based on the subdomain requested).

I'd like to add a unique robots.txt file for each subdomain (particularly so I can specify a different sitemap.xml for each one).  I've read the other posts on the subject here but nothing does quite what I am after.

My existing httpd.ini looks like this:


RewriteCond  Host:  (www\.)?olddomain\.com
RewriteRule  (.*)$2 [I,RP]
RewriteCond  Host:  newdomain\.com
RewriteRule  (.*)$2 [I,RP]
RewriteCond  Host:  (www\.)?newdomain\.com
RewriteRule  (.*)$2 [I,RP]

#EXCLUDES -- allow access to this directory
RewriteRule /(?:resources_app|scripts|rss)(?:/.*)? $0 [I,L]
RewriteRule /index.php / [I,R]

#Rule removes trailing slash, so site doesn't oops & forwards parameters
RewriteRule /([a-zA-Z=0-9_&//\-]*)/ /$1 [I,R]

RewriteRule ([^?]+)\?([a-zA-Z=0-9_&\-+%.]*) /index.php?page_url=$1&$2 [I,L]
RewriteRule .* /index.php?page_url=$0 [I,L]

Could I have a starter for 10 please?  Or a suggestion on a better approach?


Back to Top
Admin Group

Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 01 September 2010 at 3:34am

So, do you want something like when you request the content will be taken from
And similar scenario for other subdomains?
Please clarify how you want it to work on specific examples.

Back to Top

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum