i looking way rewrite url in case application path in url has different casing. since application path can vary different deployments, need access dynamically. there way of doing it?
background:
i setting path of cookies application path. since cookie path case sensitive, need rewrite urls in case wrongly cased. have alternate ways not need use of url rewrite module.
example
let's assume 1 deployment, alias application "applicationa" (for deployment, alias may "applicationb").
http://<host>:<port>/<applicationa or applicationa or applicationa etc.>/<rest of url> redirect http://<host>:<port>/applicationa/<rest of url>
not sure if rewrite correct operation in case, maybe should use redirect(permanent), below rule allowed me fetch application name in specific case:
<system.webserver> <rewrite> <rules> <rule name="my rule" stopprocessing="true"> <match url="^(.+)" ignorecase="false" /> <conditions> <add input="{request_uri}" pattern="tmp/.+" ignorecase="false" negate="true" /> <add input="{request_uri}" pattern="tmp/(.+)" ignorecase="true" /> </conditions> <action type="redirect" url="tmp/{c:1}" /> </rule> </rules> </rewrite> </system.webserver>
Comments
Post a Comment