I have a sub-domain setup and working fine until the URL to display a file is called. The URL is in the following form:
http://111.222.33.4444/temp/filename.pdf
I need it to be re-written so that it includes the sub-domain directory in the URL like this:
http://111.222.33.4444/test/temp/filename.pdf
I have tried to create a rule using URL rewrite, but it is not working correctly. Here is the rule I have written:
<rewrite>
<rewriteMaps>
<rewriteMap name="http://111.222.33.444/temp">
<add key="/temp/" value="/test/temp/" />
</rewriteMap>
</rewriteMaps>
<rules>
<rule name="Rewrite rule1 for http://111.222.33.444/temp" enabled="true">
<match url="(/temp/)(.+)" />
<conditions>
<add input="{http://111.222.33.444:{PATH_INFO}}" pattern="(/temp/)(.+)" />
</conditions>
<action type="Rewrite" url="{R:1}" appendQueryString="true" logRewrittenUrl="true" />
</rule>
</rules>
</rewrite>
Can anyone help me figure out how to make this work?
Thanks in advance...