0 Replies - 13531 Views - Last Post: 07 January 2013 - 09:27 AM

#1 vmicchia  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 35
  • Joined: 20-January 12

adding a "root" folder to the URL

Posted 07 January 2013 - 09:27 AM

I am trying to add a "fake" root folder to the url displayed the the user in my website. So if my site url is http://www.foo.com/w...jsp?querystring I would like it to become http://www.foo.com/root/whatever.jsp?querystring .

I've tried to write this but for some reason I am not getting the desired effect.

	<rule name="StripRoot" stopProcessing="true">
		<match url="root/(.*)" />
		<action type="Rewrite" url="/{R:1}" />
    <rule name="FakeRoot" preCondition="IsHtml">
        <match filterByTags="A, Area, Base, Form, Frame, IFrame, Img, Input, Link, Script" pattern="http://www\.foo\.com/(.*)" />
        <action type="Rewrite" value="http://www.foo.com/root/{R:1}" />
        <preCondition name="IsHtml">
            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />

Any assistance would be greatly appreciated

This post has been edited by vmicchia: 07 January 2013 - 09:28 AM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1