Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

url rewrite for different hosts

$
0
0

Hello,

I am trying to rewrite robots.txt for certain hosts. E.g. for all host which end *.2com.net I want to display another file robots2.txt

I wrote the folloing url but it does not work. Simply if I go from *.2com.net it displays robots.txt, not robots2.txt

                <rule name="DifRobots" patternSyntax="ECMAScript" stopProcessing="true">
                    <match url="(.*?)/?robots\.txt$" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="(.*?)/?2com\.net$" />
                    </conditions>
                    <action type="Rewrite" url="{R:1}/robots2.txt" />
                </rule>

So the question is what's wrong with this rule?


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>