url - IIS rewrite virtual folder -


i need create url rewrite rule in iis following:

from:

http://hostname/virtual_path_folder/myisapi.dll?a=1&b=1 

to:

http://hostname/myisapi.dll?a=1&b=1 

basically, i'd hide virtual_path folder if possible.

you go 2 following rules:

<rules>     <rule name="redirect if virtual_path_folder" stopprocessing="true">         <match url="^virtual_path_folder/(.*)$" />         <action type="redirect" url="{r:1}" />     </rule>     <rule name="rewrite sub folder">         <match url="^.*$" />         <action type="rewrite" url="virtual_path_folder/{r:0}" />     </rule> </rules> 

the first one, redirect if virtual_path_folder, redirect every request starting virtual_path_folder/. prevent accessing content using sub folder.

the second 1 rewrites request (^.*$) sub folder: virtual_path_folder/{r:0}


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -