Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

URL Rewrite javascript file

$
0
0

can we modify the javascript content using url rewrite?

i need to load some javascript file and it contains some redirection i.e. window.location=/test

when the script included to html files, i can rewrite it using Outbound Rules

<rule name="Rewrite URLs in Javascript response" preCondition="IsJS">
<match pattern="window\.location='(.+?)'" />
<action type="Rewrite" value="window.location='/newpath/{R:1}'" />
</rule>

<preCondition name="IsJS">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="text/html" />
</preCondition>

,i cant rewrite the script when the javascript script is loaded from file,

any helps? Thank You...


Viewing all articles
Browse latest Browse all 780

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>