asp.net - Use IIS Outbound Rewrites in C# or VB.net -


using iis url rewrite 1 can rewrite urls @ response time in iis. want able codebehind can save file rewritten urls (such sitemap.xml). possible in vb/c#? can't seem find built in way this.

alternatively, there way outbound rules through iis rewrite urls inside innerhtml of specific html item, , not attribute?

i've started write own .net class (load rewrites web.config on class instantiation, call function passing unwritten url receive rewritten one), while basic solution simpler rewrites working quite trivial, complete solution doesn't seem trivial @ all.

i found answer here:

http://forums.iis.net/t/1163122.aspx?rewriting+javascript+code+possible

you can rewrite links within javascript code using outbound rewrite without specifiy matching scope. rule looks like:

 <rule name="rewrite internal link">            <match filterbytags="none" customtags="" pattern="https://internal/" />             <action type="rewrite" value="https://extenal/" />  </rule> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -